1
0
Fork 0

Add SPI 25xx EEPROM support. (#8780)

This commit is contained in:
Nick Brassel 2020-05-19 10:34:00 +10:00 committed by GitHub
parent 4604c70c4c
commit 54b04d9665
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 368 additions and 20 deletions

View file

@ -20,19 +20,19 @@
#include "eeprom_driver.h"
uint8_t eeprom_read_byte(const uint8_t *addr) {
uint8_t ret;
uint8_t ret = 0;
eeprom_read_block(&ret, addr, 1);
return ret;
}
uint16_t eeprom_read_word(const uint16_t *addr) {
uint16_t ret;
uint16_t ret = 0;
eeprom_read_block(&ret, addr, 2);
return ret;
}
uint32_t eeprom_read_dword(const uint32_t *addr) {
uint32_t ret;
uint32_t ret = 0;
eeprom_read_block(&ret, addr, 4);
return ret;
}