phillip_bourdon234

EEPROM_Driver.h

Feb 28th, 2021 (edited)
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.72 KB | None | 0 0
  1. #ifndef EEPROM_Driver
  2. #define EEPROM_Driver
  3.  
  4. #include "stm32f10x.h"
  5. #include <stdint.h>
  6.  
  7. //The eeprom_read function takes in the EEPROM's device address and the hi
  8. //and low bytes of the internal address and returns the value of what is
  9. //inside said internal address
  10. uint8_t eeprom_read(uint8_t device_address, uint8_t addr_hi, uint8_t addr_lo);
  11.  
  12. //The eeprom_write function takes in the EEPROM's device address, the hi
  13. //and low bytes the internal address, and the data that the user wants
  14. //to store in said internal address
  15. void eeprom_write(uint8_t device_address, uint8_t addr_hi, uint8_t addr_lo, uint8_t data);
  16.  
  17. //eeprom_init simply calls the i2c_init function in the I2C_Driver.
  18. void eeprom_init(void);
  19.  
  20. #endif
  21.  
Add Comment
Please, Sign In to add comment