summaryrefslogtreecommitdiff
path: root/drivers/eeprom/eeprom_driver.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2020-05-19 10:34:00 +1000
committerGitHub <noreply@github.com>2020-05-19 10:34:00 +1000
commit54b04d96651a166088477ccf513fa534b30b2132 (patch)
treebace05e50e18069f269d6826800dd82dc2d8afbb /drivers/eeprom/eeprom_driver.c
parent4604c70c4c1a0cb2cebc010dba34b04e902bd982 (diff)
downloadqmk_firmware-54b04d96651a166088477ccf513fa534b30b2132.tar.gz
qmk_firmware-54b04d96651a166088477ccf513fa534b30b2132.zip
Add SPI 25xx EEPROM support. (#8780)
Diffstat (limited to 'drivers/eeprom/eeprom_driver.c')
-rw-r--r--drivers/eeprom/eeprom_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/eeprom/eeprom_driver.c b/drivers/eeprom/eeprom_driver.c
index 3835e5e9d0..6ce47faf7d 100644
--- a/drivers/eeprom/eeprom_driver.c
+++ b/drivers/eeprom/eeprom_driver.c
@@ -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;
}