diff --git a/drivers/at25xxx/at25xxx.c b/drivers/at25xxx/at25xxx.c index b2b3d59e53..33509b9cf0 100644 --- a/drivers/at25xxx/at25xxx.c +++ b/drivers/at25xxx/at25xxx.c @@ -113,7 +113,7 @@ static ssize_t _write_page(const at25xxx_t *dev, uint32_t pos, const void *data, int at25xxx_write(const at25xxx_t *dev, uint32_t pos, const void *data, size_t len) { - int res = len; + int res = 0; const uint8_t *d = data; if (pos + len > dev->params.size) { @@ -164,7 +164,7 @@ int at25xxx_read(const at25xxx_t *dev, uint32_t pos, void *data, size_t len) spi_release(dev->params.spi); - return len; + return 0; } uint8_t at25xxx_read_byte(const at25xxx_t *dev, uint32_t pos) diff --git a/drivers/include/at25xxx.h b/drivers/include/at25xxx.h index 33502bd5af..e4bd598234 100644 --- a/drivers/include/at25xxx.h +++ b/drivers/include/at25xxx.h @@ -82,7 +82,7 @@ uint8_t at25xxx_read_byte(const at25xxx_t *dev, uint32_t pos); * @param[out] data read buffer * @param[in] len requested length to be read * - * @return Number of bytes read + * @return 0 on success * @return -ERANGE if pos + len > EEPROM size */ int at25xxx_read(const at25xxx_t *dev, uint32_t pos, void *data, size_t len); @@ -104,7 +104,7 @@ void at25xxx_write_byte(const at25xxx_t *dev, uint32_t pos, uint8_t data); * @param[in] data write buffer * @param[in] len requested length to be written * - * @return Number of bytes written + * @return 0 on success * @return -ERANGE if pos + len > EEPROM size */ int at25xxx_write(const at25xxx_t *dev, uint32_t pos, const void *data, size_t len);