SPIFlash庫

從 YFRobotwiki
在2016年12月29日 (四) 09:55由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: For a full diagnostics rundown - with error codes and details of the errors./有關完整診斷程序 - 包含錯誤代碼和錯誤詳細信息
- Struct_writer: This program writes a struct to a random location on your flash memory chip and reads it back./這個程序寫一個struct到閃存芯片的隨機位置然後讀取它。
- TestFlash: The Test program show all most function./測試程序演示大部分功能函數
- getAddressEx: This program shows the method to use the getAddress() function to automate the process of address allocation when using a flash memory module. Please note the special function used to get the size of the String object./這個程序演示了使用getAddress()函數自動地址配置的過程在使用閃存模塊。 請注意特殊函數使用字符串對象的大小。

- readWriteString: This program shows the method of reading a string from the console and saving it to flash memory./這個程序演示了閱讀一個字符串從控制台並保存到閃存

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論壇