mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/cryptoauthlib: migrate to ztimer
This commit is contained in:
parent
48fc63e0ae
commit
bb5aaa38ad
@ -1,4 +1,5 @@
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += ztimer
|
||||
USEMODULE += ztimer_usec
|
||||
FEATURES_REQUIRED += periph_i2c
|
||||
FEATURES_OPTIONAL += periph_i2c_reconfigure
|
||||
DEFAULT_MODULE += auto_init_security
|
||||
|
@ -19,7 +19,8 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "xtimer.h"
|
||||
#include "timex.h"
|
||||
#include "ztimer.h"
|
||||
#include "periph/i2c.h"
|
||||
#include "periph/gpio.h"
|
||||
|
||||
@ -29,17 +30,17 @@
|
||||
/* Timer functions */
|
||||
void atca_delay_us(uint32_t delay)
|
||||
{
|
||||
xtimer_usleep(delay);
|
||||
ztimer_sleep(ZTIMER_USEC, delay);
|
||||
}
|
||||
|
||||
void atca_delay_10us(uint32_t delay)
|
||||
{
|
||||
xtimer_usleep(delay * 10);
|
||||
ztimer_sleep(ZTIMER_USEC, delay * 10);
|
||||
}
|
||||
|
||||
void atca_delay_ms(uint32_t delay)
|
||||
{
|
||||
xtimer_usleep(delay * 1000);
|
||||
ztimer_sleep(ZTIMER_USEC, delay * US_PER_MS);
|
||||
}
|
||||
|
||||
/* Hal I2C implementation */
|
||||
|
Loading…
Reference in New Issue
Block a user