From bb00fee9702155586e674b9d6a3b838bd54baac2 Mon Sep 17 00:00:00 2001 From: J08nY Date: Tue, 26 Nov 2019 20:37:19 +0100 Subject: Add ASN.1 parsing and more utility functions, + commands sketch. --- pyecsca/codegen/simpleserial/simpleserial.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pyecsca/codegen/simpleserial/simpleserial.h') diff --git a/pyecsca/codegen/simpleserial/simpleserial.h b/pyecsca/codegen/simpleserial/simpleserial.h index fa64865..a5dff81 100644 --- a/pyecsca/codegen/simpleserial/simpleserial.h +++ b/pyecsca/codegen/simpleserial/simpleserial.h @@ -6,6 +6,9 @@ #include +#define MAX_SS_CMDS 26 +#define MAX_SS_LEN 512 + // Set up the SimpleSerial module // This prepares any internal commands void simpleserial_init(void); @@ -32,7 +35,7 @@ int simpleserial_addcmd(char c, unsigned int len, uint8_t (*fp)(uint8_t*, uint16 // - First character didn't match any known commands // - One of the characters wasn't in [0-9|A-F|a-f] // - Data was too short or too long -void simpleserial_get(void); +int simpleserial_get(void); // Write some data to the serial port // Prepends the character c to the start of the line -- cgit v1.3.1