外部EEPROM读写
void WRITE_FLOAT_EXT_EEPROM(long int n, float data) { //写浮点数到外部EEPROM int i; for (i = 0; i < 4; i++) write_ext_eeprom(i + n, *(&data + i) ) ; } float READ_FLOAT_EXT_EEPROM(long int n) {//从外部EEPROM读出浮点数 int i; float data; for (i = 0; i < 4; i++) *(&data + i) = read_ext_eeprom(i + n); return(data); } void WRITE_LONG_EXT_EEPROM(long int n, long data) { //写长整型数到外部EEPROM int i; for (i = 0; i < 4; i++) write_ext_eeprom(i + n, *(&data + i) ) ; } float READ_LONG_EXT_EEPROM(long int n) {//从外部EEPROM读出写入的长整型数 int i; long data; for (i = 0; i < 4; i++) *(&data + i) = read_ext_eeprom(i + n); return(data); }
文件列表
24LC65外部EEPROM.rar
(预估有个14文件)
24LC65外部EEPROM
24LC65.err
11B
24LC65.HEX
11KB
24LC65.cof
55KB
24LC65.c
2KB
24LC65.sta
2KB
lcd_lib_mo_low4.c
5KB
24LC65.esym
8KB
24LC65.tre
7KB
lcd_lib_mo.c
6KB
用户评论