From 15a1fb1e5b16f59fb7d7b91c965fac0c10072439 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Thu, 6 Dec 2018 23:48:46 -0500 Subject: [PATCH] fix pc build --- Makefile | 2 +- fido2/crypto.c | 1 + pc/app.h | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4c22e4d..4b9b8f2 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ INCLUDES = -I./tinycbor/src -I./crypto/sha256 -I./crypto/micro-ecc/ -Icrypto/tin CFLAGS += $(INCLUDES) # for crypto/tiny-AES-c -CFLAGS += -DAES256=1 +CFLAGS += -DAES256=1 -DAPP_CONFIG=\"app.h\" name = main diff --git a/fido2/crypto.c b/fido2/crypto.c index 9248644..459b026 100644 --- a/fido2/crypto.c +++ b/fido2/crypto.c @@ -18,6 +18,7 @@ #include "aes.h" #include "ctap.h" #include "device.h" +#include "log.h" #include APP_CONFIG #ifdef USING_PC diff --git a/pc/app.h b/pc/app.h index a45833f..aee6bdf 100644 --- a/pc/app.h +++ b/pc/app.h @@ -20,5 +20,20 @@ void printing_init(); +// 0xRRGGBB +#define LED_INIT_VALUE 0x000800 +#define LED_MAX_SCALER 30 +#define LED_MIN_SCALER 1 +// # of ms between each change in LED +#define HEARTBEAT_PERIOD 100 +// Each LED channel will be multiplied by a integer between LED_MAX_SCALER +// and LED_MIN_SCALER to cause the slow pulse. E.g. +// #define LED_INIT_VALUE 0x301000 +// #define LED_MAX_SCALER 30 +// #define LED_MIN_SCALER 1 +// #define HEARTBEAT_PERIOD 8 +// Will pulse from 0x301000 to 0x903000 to 0x301000 ... +// Which will take ~8 * (30)*2 ms + #endif /* SRC_APP_H_ */