set_bank()
描述
是否要使用大小為 16KB 的虛擬 EEPROM (它是透過 flash 實作的)。
語法
EEPROM.set_bank(flag)
參數
flag
: 在 EEPROM 函式庫中,指定是否要存取 16KB 的虛擬 EEPROM (布林值)。
假如 flag
= true
,代表 EEPROM 函式庫存取的是 16 KB 虛擬 EEPROM。假如 flag
= false
,就是存取 200-byte 的 CMOS 虛擬 EEPROM。預設值是 false
(存取 200-byte 的 CMOS 虛擬 EEPROM)。
回傳
無回傳值
範例
#include <EEPROM.h> void setup() { EEPROM.set_bank(true); for (int i = 0; i < 16000; i++) EEPROM.write(i, i & 0xff); } void loop() { }
See also
- EEPROM.read()
- EEPROM.write()
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.