SPIFlash庫

從 YFRobotwiki
在2016年12月26日 (一) 08:51由Allblue對話 | 貢獻所做的修訂版本

跳到: 導覽搜尋


SPIFlash庫 -- SPI華邦電子閃存Flash芯片arduino庫 GITHUB 工程地址:SPIFlash

該庫是用於華邦串行閃存芯片的庫。目前的形式支持識別閃存芯片和它的各種功能;自動地址分配管理;在不同位置讀寫數據類型bytes/chars/ints/longs/floats/Strings;讀寫頁面位元組;連續讀寫位元組/字符數組;扇區,塊或整個芯片的擦除,關閉低功率操作。

支持arduino IDE 版本:

  • IDE v1.5.x
  • IDE v1.6.0-v1.6.5
  • IDE v1.6.9-v1.6.11

支持控制板:

  • Arduino Uno
  • Arduino Leonardo
  • Arduino Micro
  • Arduino Fio
  • Arduino Mega
  • Arduino Due
  • ESP8266 (On the Arduino IDE)
  • ATTiny85


示例


- Diagnostics: This demonstrates how to write and read data from the extended memory of the device. This memory is retained even after the device has lost power./演示如何讀寫數據從設備的擴展內存。即使設備掉電內存依然保存
- Struct_writer: This demonstrates how to set and get the date and time from the device./演示了如何在設備上設置和獲取日期和時間
- TestFlash: This demonstrates how to set the alarms and check when the alarms are triggered. This includes using the squarewave output to trigger an interrupt./演示如何設置鬧鐘和檢查何時觸發鬧鐘。這包含使用方波輸出觸發一個中斷
- getAddressEx: Don't need to `#include <SPI.h>` in user code anymore. Just including…./演示如何在設備上設置和獲取日期和時間。
- readWriteString: Added a speed comparison excel spreadsheet and more examples./演示如何關閉RTC時鐘以保證板載電池能持續更長時間

SPIFlash

SPIFlash 函數。

- begin() -- 初始化
參數:無
返回:無
- setClock()
-libver(uint8_t *b1, uint8_t *b2, uint8_t *b3) -- 設置方波輸出引腳
參數:DS3231SquareWavePinMode pinMode

返回:無


- error() -- 檢查錯誤
參數:無
返回:uint8_t
- getManID() -- 檢查錯誤
參數:無
返回:uint8_t
- getJEDECID() -- 檢查錯誤
參數:無
返回:uint8_t
- getAddress(uint16_t size, uint16_t &page_number, uint8_t &offset) -- 檢查錯誤
參數:
  • size -
  • &page_number -
  • &offset -
返回:bool
- getAddress(uint16_t size) -- 檢查錯誤
參數:無
返回:uint32_t
- getChipName() -- 檢查錯誤
參數:無
返回:uint16_t
- sizeofStr(String &inputStr) -- 檢查錯誤
參數:&inputStr
返回:uint16_t
- getCapacity() -- 檢查錯誤
參數:無
返回:uint32_t
- getMaxPage() -- 檢查錯誤
參數:無
返回:uint32_t
- writeByte(uint32_t address, uint8_t data, bool errorCheck = true) -- 檢查錯誤
參數:
  • address -
  • data -
  • errorCheck -
返回:bool
- writeByte(uint16_t page_number, uint8_t offset, uint8_t data, bool errorCheck = true) -- 檢查錯誤
參數:
  • page_number -
  • offset -
  • data -
  • errorCheck -
返回:bool
- readByte(uint16_t page_number, uint8_t offset, bool fastRead = false) -- 檢查錯誤
參數:
  • page_number -
  • offset -
  • fastRead -
返回:uint8_t
- readByte(uint32_t address, bool fastRead = false) -- 檢查錯誤
參數:
  • address -
  • fastRead -
返回:uint8_t


- getMaxPage() -- 檢查錯誤
參數:無
返回:uint32_t
- getMaxPage() -- 檢查錯誤
參數:無
返回:uint32_t


- getMaxPage() -- 檢查錯誤
參數:無
返回:uint32_t
- getMaxPage() -- 檢查錯誤
參數:無
返回:uint32_t





返回語音模塊

返回Arduino庫菜單

返回首頁

更多建議和問題歡迎反饋至 YFRobot論壇