From 2c001f5a6cc6e1244fd1e21bdfa4fa93db58258f Mon Sep 17 00:00:00 2001 From: fabian18 Date: Fri, 9 Aug 2019 17:27:32 +0200 Subject: [PATCH] drivers/include/periph/eeprom: Changed uint8_t* to void* in API --- cpu/atmega_common/periph/eeprom.c | 4 ++-- cpu/stm32_common/periph/eeprom.c | 4 ++-- drivers/include/periph/eeprom.h | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpu/atmega_common/periph/eeprom.c b/cpu/atmega_common/periph/eeprom.c index 15129e53f6..90d003305d 100644 --- a/cpu/atmega_common/periph/eeprom.c +++ b/cpu/atmega_common/periph/eeprom.c @@ -27,7 +27,7 @@ #define ENABLE_DEBUG (0) #include "debug.h" -size_t eeprom_read(uint32_t pos, uint8_t *data, size_t len) +size_t eeprom_read(uint32_t pos, void *data, size_t len) { assert(pos + len <= EEPROM_SIZE); @@ -50,7 +50,7 @@ size_t eeprom_read(uint32_t pos, uint8_t *data, size_t len) return len; } -size_t eeprom_write(uint32_t pos, const uint8_t *data, size_t len) +size_t eeprom_write(uint32_t pos, const void *data, size_t len) { assert(pos + len <= EEPROM_SIZE); diff --git a/cpu/stm32_common/periph/eeprom.c b/cpu/stm32_common/periph/eeprom.c index 0554c61e15..463a8d2ceb 100644 --- a/cpu/stm32_common/periph/eeprom.c +++ b/cpu/stm32_common/periph/eeprom.c @@ -85,7 +85,7 @@ static void _write_byte(uint32_t addr, uint8_t data) #endif } -size_t eeprom_read(uint32_t pos, uint8_t *data, size_t len) +size_t eeprom_read(uint32_t pos, void *data, size_t len) { assert(pos + len <= EEPROM_SIZE); @@ -102,7 +102,7 @@ size_t eeprom_read(uint32_t pos, uint8_t *data, size_t len) return len; } -size_t eeprom_write(uint32_t pos, const uint8_t *data, size_t len) +size_t eeprom_write(uint32_t pos, const void *data, size_t len) { assert(pos + len <= EEPROM_SIZE); diff --git a/drivers/include/periph/eeprom.h b/drivers/include/periph/eeprom.h index e08a8ebca4..6cde95fd59 100644 --- a/drivers/include/periph/eeprom.h +++ b/drivers/include/periph/eeprom.h @@ -57,12 +57,12 @@ uint8_t eeprom_read_byte(uint32_t pos); * EEPROM. * * @param[in] pos start position in eeprom - * @param[out] data output byte array to write to + * @param[out] data output memory location to write to * @param[in] len the number of bytes to read * * @return the number of bytes read */ -size_t eeprom_read(uint32_t pos, uint8_t *data, size_t len); +size_t eeprom_read(uint32_t pos, void *data, size_t len); /** * @brief Write a byte at the given position @@ -79,12 +79,12 @@ void eeprom_write_byte(uint32_t pos, uint8_t data); * EEPROM. * * @param[in] pos start position in eeprom - * @param[in] data input byte array to read into + * @param[in] data input memory location to read into * @param[in] len the number of bytes to read * * @return the number of bytes written */ -size_t eeprom_write(uint32_t pos, const uint8_t *data, size_t len); +size_t eeprom_write(uint32_t pos, const void *data, size_t len); /** * @brief Set @p len bytes from the given position @p pos with value @p val