mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Revert "drivers/at25xxx: return read/written bytes to match MTD API"
This reverts commit 8a2a936726
.
This commit is contained in:
parent
a3a1c160ee
commit
50d408b202
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user