SPIFlash库:修訂版本之間的差異

出自YFRobotwiki
跳轉到: 導覽搜尋
第 78 行: 第 78 行:
 
::返回:uint8_t
 
::返回:uint8_t
  
:- <font color="forestgreen">getManID()</font>  --  检查错误
+
:- <font color="forestgreen">getCapacity()</font>  --  获取芯片容量
 
::参数:无
 
::参数:无
::返回 :uint8_t
+
::返回 :uint32_t
  
:- <font color="forestgreen">getJEDECID()</font>  --  检查错误
+
:- <font color="forestgreen">getMaxPage()</font>  --  获取最大页数
 
::参数:无
 
::参数:无
::返回 :uint8_t
+
::返回 :uint32_t
  
:- <font color="forestgreen">getAddress(uint16_t size, uint16_t &page_number, uint8_t &offset)</font>  -- 检查错误
+
:- <font color="forestgreen">getChipName()</font>  -- 获取芯片识别名称
 +
::参数:无
 +
::返回:uint16_t
 +
 
 +
 
 +
:- <font color="forestgreen">getManID()</font>  -- 检查和启动芯片并获取16位int型制造商ID
 +
::参数:无
 +
::返回:uint16_t
 +
 
 +
:- <font color="forestgreen">getJEDECID()</font>  -- 检查和启动芯片并获取32位int型 JEDEC ID
 +
::参数:无
 +
::返回:uint32_t
 +
 
 +
 
 +
-- 获取下一个可用地址使用:
 +
--    A.以数据的大小作为参数,并返回一个32位的地址
 +
--    B.3个参数,数据大小、页数及位置
 +
--  所有地址的素描必须获得通过该函数或不
 +
:- <font color="forestgreen">getAddress(uint16_t size)</font>  -- A
 +
::参数:size - 数据大小
 +
::返回:uint32_t
 +
 
 +
:- <font color="forestgreen">getAddress(uint16_t size, uint16_t &page_number, uint8_t &offset)</font>  -- B
 
::参数:
 
::参数:
 
:::* size -  
 
:::* size -  
 
:::* &page_number -  
 
:::* &page_number -  
 
:::* &offset -  
 
:::* &offset -  
 +
::返回:bool
  
 +
:- <font color="forestgreen">sizeofStr(String &inputStr)</font>  -- 函数返回字符串的大小(仅用于getAddress()函数)
 +
::参数:inputStr - 字符串
 +
::返回:uint16_t
 +
 +
 +
-- 从一个页面的特定位置读一个<font color="red">字节</font>的数据
 +
--    A & B
 +
:- <font color="forestgreen">readByte(uint32_t address, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 - 最大存储地址)
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:uint8_t
 +
 +
:- <font color="forestgreen">readByte(uint16_t page_number, uint8_t offset, bool fastRead)</font>  -- B
 +
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:uint8_t
 +
 +
 +
-- 从一个页面的特定位置读一个<font color="red">字符</font>的数据
 +
--    A & B
 +
:- <font color="forestgreen">readChar(uint32_t address, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 - 最大存储地址)
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:int8_t
 +
 +
:- <font color="forestgreen">readChar(uint16_t page_number, uint8_t offset, bool fastRead)</font>  -- B
 +
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:int8_t
 +
 +
 +
-- 从一个页面的特定位置读一个<font color="red">字节数组</font>的数据
 +
--    A & B
 +
:- <font color="forestgreen">readByteArray(uint32_t address, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 - 最大存储地址)
 +
:::* data_buffer - 读取的数据
 +
:::* bufferSize - 读取数据大小
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 
::返回:bool
 
::返回:bool
  
:- <font color="forestgreen">getAddress(uint16_t size)</font>  -- 检查错误
+
:- <font color="forestgreen">readByteArray(uint16_t page_number, uint8_t offset, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead)</font>  -- B
::参数:
+
::参数:
::返回 :uint32_t
+
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* data_buffer - 读取的数据
 +
:::* bufferSize - 读取数据大小
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回 :bool
  
:- <font color="forestgreen">getChipName()</font>  --  检查错误
+
 
::参数:无
+
-- 从一个页面的特定位置读一个<font color="red">字符数组</font>的数据
 +
--    A & B
 +
:- <font color="forestgreen">readCharArray(uint32_t address, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 最大存储地址)
 +
:::* data_buffer - 读取的数据
 +
:::* bufferSize - 读取数据大小
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:bool
 +
 
 +
:- <font color="forestgreen">readCharArray(uint16_t page_number, uint8_t offset, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead)</font>  -- B
 +
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* data_buffer - 读取的数据
 +
:::* bufferSize - 读取数据大小
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:bool
 +
 
 +
 
 +
-- 从一个页面的特定位置读一个<font color="red"> 符号整型(unsigned int)</font>数据
 +
--    A & B
 +
:- <font color="forestgreen">readWord(uint32_t address, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 - 最大存储地址)
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 
::返回:uint16_t
 
::返回:uint16_t
  
:- <font color="forestgreen">sizeofStr(String &inputStr)</font>  -- 检查错误
+
:- <font color="forestgreen">readWord(uint16_t page_number, uint8_t offset, bool fastRead)</font>  -- B
::参数:&inputStr
+
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 
::返回:uint16_t
 
::返回:uint16_t
  
:- <font color="forestgreen">getCapacity()</font>  --  检查错误
+
 
::参数:无
+
-- 从一个页面的特定位置读一个<font color="red">整型(int)</font>数据
 +
--    A & B
 +
:- <font color="forestgreen">readShort(uint32_t address, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 最大存储地址)
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:int16_t
 +
 
 +
:- <font color="forestgreen">readShort(uint16_t page_number, uint8_t offset, bool fastRead)</font>  -- B
 +
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:int16_t
 +
 
 +
 
 +
-- 从一个页面的特定位置读一个<font color="red"> 符号长整型(unsigned long)</font>数据
 +
--    A & B
 +
:- <font color="forestgreen">readULong(uint32_t address, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 - 最大存储地址)
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 
::返回:uint32_t
 
::返回:uint32_t
  
:- <font color="forestgreen">getMaxPage()</font>  -- 检查错误
+
:- <font color="forestgreen">readULong(uint16_t page_number, uint8_t offset, bool fastRead)</font>  -- B
::参数:
+
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 
::返回:uint32_t
 
::返回:uint32_t
  
:- <font color="forestgreen">writeByte(uint32_t address, uint8_t data, bool errorCheck = true)</font>  --  检查错误
+
 
 +
-- 从一个页面的特定位置读一个<font color="red">长整型(long)</font>数据
 +
--    A & B
 +
:- <font color="forestgreen">readLong(uint32_t address, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 - 最大存储地址)
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:int32_t
 +
 
 +
:- <font color="forestgreen">readLong(uint16_t page_number, uint8_t offset, bool fastRead)</font>  -- B
 +
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:int32_t
 +
 
 +
 
 +
-- 从一个页面的特定位置读一个<font color="red">浮点(float)</font>数据 ??
 +
--    A & B
 +
:- <font color="forestgreen">readFloat(uint32_t address, bool fastRead)</font>  -- A
 +
::参数:
 +
:::* address 地址(0 - 最大存储地址)
 +
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:float
 +
 
 +
:- <font color="forestgreen">readFloat(uint16_t page_number, uint8_t offset, bool fastRead)</font>  -- B
 +
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 +
::返回:float
 +
 
 +
 
 +
-- 从一个页面的特定位置读一个<font color="red">字符串(string)</font>数据
 +
--    A & B
 +
:- <font color="forestgreen">readStr(uint32_t address, String &outStr, bool fastRead)</font>  -- A
 
::参数:
 
::参数:
:::* address -  
+
:::* address - 地址(0 - 最大存储地址)
:::* data -  
+
:::* outputString --> 字符串
:::* errorCheck -  
+
:::* fastRead - 默认为false( 如果设置为true将执行 _beginFastRead() )
 
::返回:bool
 
::返回:bool
  
:- <font color="forestgreen">writeByte(uint16_t page_number, uint8_t offset, uint8_t data, bool errorCheck = true)</font>  -- 检查错误
+
:- <font color="forestgreen">readStr(uint16_t page_number, uint8_t offset, String &outStr, bool fastRead)</font>  -- B
 
::参数:
 
::参数:
:::* page_number -  
+
:::* page_number - 页数(0-最大页数)
:::* offset -  
+
:::* offset - 页面中的地址(0-255)
:::* data -  
+
:::* outputString --> 字符串
:::* errorCheck -  
+
:::* fastRead -  默认为false( 如果设置为true将执行 _beginFastRead() )
 
::返回:bool
 
::返回:bool
  
:- <font color="forestgreen">readByte(uint16_t page_number, uint8_t offset, bool fastRead = false)</font>  -- 检查错误
+
 
 +
-- 写一个<font color="red">字节(byte)</font>数据到一个页面的特定位置
 +
--    A & B
 +
--  提示:写数据之前需要清除存储位置
 +
:- <font color="forestgreen">writeByte(uint32_t address, uint8_t data, bool errorCheck)</font>  -- A
 
::参数:
 
::参数:
:::* page_number -  
+
:::* address - 地址(0 - 最大存储地址)
:::* offset -  
+
:::* data - 写入的数据(0-255)
:::* fastRead -  
+
:::* errorCheck - 默认true,检查是否写入
::返回 :uint8_t
+
::返回 :bool
  
:- <font color="forestgreen">readByte(uint32_t address, bool fastRead = false)</font>  -- 检查错误
+
:- <font color="forestgreen">writeByte(uint16_t page_number, uint8_t offset, uint8_t data, bool errorCheck)</font>  -- B
 
::参数:
 
::参数:
:::* address -  
+
:::* page_number - 页数(0-最大页数)
:::* fastRead -  
+
:::* offset - 页面中的地址(0-255)
::返回 :uint8_t
+
:::* data - 写入的数据(0-255)
 +
:::* errorCheck - 默认true,检查是否写入
 +
::返回:bool
 +
 
 +
 
 +
-- 写一个<font color="red">字符(char)</font>数据到一个页面的特定位置
 +
--    A & B
 +
--  提示:写数据之前需要清除存储位置
 +
:- <font color="forestgreen">writeByte(uint32_t address, uint8_t data, bool errorCheck)</font>  -- A
 +
::参数:
 +
:::* address - 地址(0 - 最大存储地址)
 +
:::* data - 写入的数据(0-255)
 +
:::* errorCheck - 默认true,检查是否写入
 +
::返回 :bool
 +
 
 +
:- <font color="forestgreen">writeByte(uint16_t page_number, uint8_t offset, uint8_t data, bool errorCheck)</font>  -- B
 +
::参数:
 +
:::* page_number - 页数(0-最大页数)
 +
:::* offset - 页面中的地址(0-255)
 +
:::* data - 写入的数据(0-255)
 +
:::* errorCheck - 默认true,检查是否写入
 +
::返回:bool
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
  
  

2017年1月11日 (三) 14:45的修訂版本


小編奮力編輯中....


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
- getCapacity() -- 獲取芯片容量
參數:無
返回:uint32_t
- getMaxPage() -- 獲取最大頁數
參數:無
返回:uint32_t
- getChipName() -- 獲取芯片識別名稱
參數:無
返回:uint16_t


- getManID() -- 檢查和啟動芯片並獲取16位int型製造商ID
參數:無
返回:uint16_t
- getJEDECID() -- 檢查和啟動芯片並獲取32位int型 JEDEC ID
參數:無
返回:uint32_t


-- 獲取下一個可用地址使用: -- A.以數據的大小作為參數,並返回一個32位的地址 -- B.3個參數,數據大小、頁數及位置 -- 所有地址的素描必須獲得通過該函數或不

- getAddress(uint16_t size) -- A
參數:size - 數據大小
返回:uint32_t
- getAddress(uint16_t size, uint16_t &page_number, uint8_t &offset) -- B
參數:
  • size -
  • &page_number -
  • &offset -
返回:bool
- sizeofStr(String &inputStr) -- 函數返回字符串的大小(僅用於getAddress()函數)
參數:inputStr - 字符串
返回:uint16_t


-- 從一個頁面的特定位置讀一個字節的數據 -- A & B

- readByte(uint32_t address, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:uint8_t
- readByte(uint16_t page_number, uint8_t offset, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:uint8_t


-- 從一個頁面的特定位置讀一個字符的數據 -- A & B

- readChar(uint32_t address, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:int8_t
- readChar(uint16_t page_number, uint8_t offset, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:int8_t


-- 從一個頁面的特定位置讀一個字節數組的數據 -- A & B

- readByteArray(uint32_t address, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • data_buffer - 讀取的數據
  • bufferSize - 讀取數據大小
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:bool
- readByteArray(uint16_t page_number, uint8_t offset, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • data_buffer - 讀取的數據
  • bufferSize - 讀取數據大小
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:bool


-- 從一個頁面的特定位置讀一個字符數組的數據 -- A & B

- readCharArray(uint32_t address, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • data_buffer - 讀取的數據
  • bufferSize - 讀取數據大小
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:bool
- readCharArray(uint16_t page_number, uint8_t offset, uint8_t *data_buffer, uint16_t bufferSize, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • data_buffer - 讀取的數據
  • bufferSize - 讀取數據大小
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:bool


-- 從一個頁面的特定位置讀一個無符號整型(unsigned int)數據 -- A & B

- readWord(uint32_t address, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:uint16_t
- readWord(uint16_t page_number, uint8_t offset, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:uint16_t


-- 從一個頁面的特定位置讀一個整型(int)數據 -- A & B

- readShort(uint32_t address, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:int16_t
- readShort(uint16_t page_number, uint8_t offset, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:int16_t


-- 從一個頁面的特定位置讀一個無符號長整型(unsigned long)數據 -- A & B

- readULong(uint32_t address, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:uint32_t
- readULong(uint16_t page_number, uint8_t offset, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:uint32_t


-- 從一個頁面的特定位置讀一個長整型(long)數據 -- A & B

- readLong(uint32_t address, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:int32_t
- readLong(uint16_t page_number, uint8_t offset, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:int32_t


-- 從一個頁面的特定位置讀一個浮點(float)數據 ?? -- A & B

- readFloat(uint32_t address, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:float
- readFloat(uint16_t page_number, uint8_t offset, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:float


-- 從一個頁面的特定位置讀一個字符串(string)數據 -- A & B

- readStr(uint32_t address, String &outStr, bool fastRead) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • outputString --> 字符串
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:bool
- readStr(uint16_t page_number, uint8_t offset, String &outStr, bool fastRead) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • outputString --> 字符串
  • fastRead - 默認為false( 如果設置為true將執行 _beginFastRead() )
返回:bool


-- 寫一個字節(byte)數據到一個頁面的特定位置 -- A & B -- 提示:寫數據之前需要清除存儲位置

- writeByte(uint32_t address, uint8_t data, bool errorCheck) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • data - 寫入的數據(0-255)
  • errorCheck - 默認true,檢查是否寫入
返回:bool
- writeByte(uint16_t page_number, uint8_t offset, uint8_t data, bool errorCheck) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • data - 寫入的數據(0-255)
  • errorCheck - 默認true,檢查是否寫入
返回:bool


-- 寫一個字符(char)數據到一個頁面的特定位置 -- A & B -- 提示:寫數據之前需要清除存儲位置

- writeByte(uint32_t address, uint8_t data, bool errorCheck) -- A
參數:
  • address - 地址(0 - 最大存儲地址)
  • data - 寫入的數據(0-255)
  • errorCheck - 默認true,檢查是否寫入
返回:bool
- writeByte(uint16_t page_number, uint8_t offset, uint8_t data, bool errorCheck) -- B
參數:
  • page_number - 頁數(0-最大頁數)
  • offset - 頁面中的地址(0-255)
  • data - 寫入的數據(0-255)
  • errorCheck - 默認true,檢查是否寫入
返回:bool













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


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





返回語音模塊

返回Arduino庫菜單

返回首頁

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