123456789101112131415161718 |
- #ifndef __HW_IIC_H__
- #define __HW_IIC_H__
- #define EEPROM_SIZE 512
- void hw_iic_init(void);
- void hw_iic_write_byte(unsigned char value);
- unsigned char hw_iic_read_byte(void);
- unsigned short hw_iic_rw_addr(unsigned short addr);
- unsigned char hw_iic_device_id(unsigned short addr);
- void eeprom_write_byte(unsigned short addr, unsigned char dat);
- void eeprom_write_array(unsigned short addr,unsigned char *src, int size);
- void eeprom_write_word_array(unsigned short addr, unsigned short *src,int size);
- void eeprom_write_word(unsigned short addr, unsigned short dat);
- void eeprom_write_dword(unsigned short addr, unsigned int dat);
- unsigned char eeprom_read_byte(unsigned short addr);
- void eeprom_read_array(unsigned short addr,unsigned char *dst, int size);
- #endif
|