1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

pkg/cryptoauthlib: make atca dev type configurable

This commit is contained in:
Lena Boeckmann 2020-02-05 16:48:30 +01:00
parent 81d348cafd
commit 23aa05126d
2 changed files with 10 additions and 2 deletions

View File

@ -50,10 +50,13 @@ extern "C" {
#ifndef ATCA_RX_RETRIES
#define ATCA_RX_RETRIES (20)
#endif
#ifndef ATCA_DEVTYPE
#define ATCA_DEVTYPE (ATECC508A)
#endif
#ifndef ATCA_PARAMS
#define ATCA_PARAMS { .iface_type = ATCA_I2C_IFACE, \
.devtype = ATECC508A, \
.devtype = ATCA_DEVTYPE, \
.atcai2c.slave_address = ATCA_PARAM_ADDR, \
.atcai2c.bus = ATCA_PARAM_I2C, \
.atcai2c.baud = -1, /**< Not used in RIOT */ \

View File

@ -23,7 +23,12 @@
int main(void)
{
/* Set device to ATECC508A */
atca_run_cmd("508");
if (ATCA_DEVTYPE == ATECC608A) {
atca_run_cmd("608");
}
else {
atca_run_cmd("508");
}
atca_run_cmd("unit");