eeprom.c
来自「Light dimmer application firmware code.」· C语言 代码 · 共 19 行
C
19 行
#include "eeprom.h"#include <avr/io.h>void eeprom_writebyte(unsigned int loc, unsigned char data){ while (EECR & (1 << EEWE)); EEAR = loc; EEDR = data; EECR |= (1 << EEMWE); EECR |= (1 << EEWE);}void eeprom_writeint(unsigned int loc, unsigned int data){ eeprom_writebyte(loc, (data >> 8)); eeprom_writebyte(loc + 1, (data & 0xff));}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?