Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/at24cxxx/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FEATURES_REQUIRED += periph_i2c
USEMODULE += xtimer
USEMODULE += ztimer_usec
6 changes: 3 additions & 3 deletions drivers/at24cxxx/at24cxxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "assert.h"
#include "macros/utils.h"
#include "xtimer.h"
#include "ztimer.h"

#include "at24cxxx_defines.h"
#include "at24cxxx.h"
Expand Down Expand Up @@ -95,7 +95,7 @@ int _read(const at24cxxx_t *dev, uint32_t pos, void *data, size_t len)
if (--polls == 0) {
break;
}
xtimer_usleep(AT24CXXX_POLL_DELAY_US);
ztimer_sleep(ZTIMER_USEC, AT24CXXX_POLL_DELAY_US);
}

DEBUG("[at24cxxx] i2c_read_regs(): %d; polls: %d\n", check, polls);
Expand Down Expand Up @@ -154,7 +154,7 @@ int _write_page(const at24cxxx_t *dev, uint32_t pos, const void *data, size_t le
if (--polls == 0) {
break;
}
xtimer_usleep(AT24CXXX_POLL_DELAY_US);
ztimer_sleep(ZTIMER_USEC, AT24CXXX_POLL_DELAY_US);
}

DEBUG("[at24cxxx] i2c_write_regs(): %d; polls: %d\n", check, polls);
Expand Down
2 changes: 1 addition & 1 deletion drivers/at25xxx/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FEATURES_REQUIRED += periph_spi
USEMODULE += xtimer
USEMODULE += ztimer_usec
4 changes: 2 additions & 2 deletions drivers/at25xxx/at25xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "bitarithm.h"
#include "byteorder.h"

#include "xtimer.h"
#include "ztimer.h"
#define POLL_DELAY_US (1000)

#ifndef min
Expand Down Expand Up @@ -76,14 +76,14 @@
uint8_t tries = 10;
while (_write_in_progress(dev) && --tries) {
spi_release(dev->params.spi);
xtimer_usleep(POLL_DELAY_US);
ztimer_sleep(ZTIMER_USEC, POLL_DELAY_US);
getbus(dev);
}

return tries == 0 ? -ETIMEDOUT : 0;
}

static int _at25xxx_write_page(const at25xxx_t *dev, uint32_t page, uint32_t offset, const void *data, size_t len)

Check warning on line 86 in drivers/at25xxx/at25xxx.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
{
assert(offset < AT25_PAGE_SIZE);

Expand Down Expand Up @@ -115,7 +115,7 @@
return len;
}

int at25xxx_write_page(const at25xxx_t *dev, uint32_t page, uint32_t offset, const void *data, size_t len)

Check warning on line 118 in drivers/at25xxx/at25xxx.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
{
int res;

Expand Down
4 changes: 2 additions & 2 deletions tests/drivers/at24cxxx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
* @}
*/

#include <inttypes.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>

#include "xtimer.h"

#include "architecture.h"
#include "at24cxxx.h"
#include "at24cxxx_params.h"

Expand Down