dev_at24cxx.h 469 B

12345678910111213141516171819202122
  1. #ifndef __DEV_AT24CXX_H
  2. #define __DEV_AT24CXX_H
  3. #include "i2c1.h"
  4. #define bool uint8_t
  5. #define I2C1_NAME I2C1
  6. // #define I2C1_DEVICE_IS_EEPROM 1
  7. #define MAX_SIZE 512
  8. #define PAGES 512
  9. #define PAGESIZE 8
  10. #define BLOCK_SIZE 512
  11. ///**********************************
  12. #define NULL 0
  13. int32_t dev_at24cxx_read_bytes(uint8_t addr, uint8_t *buf, uint8_t size);
  14. int32_t dev_at24cxx_write_bytes(uint8_t addr, uint8_t *buf, uint8_t size);
  15. #endif // __DEV_AT24CXX_H