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.