summaryrefslogtreecommitdiff
path: root/src/ao_radio_cmac.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-16 14:25:01 -0700
committerKeith Packard <keithp@keithp.com>2011-08-27 12:33:46 -0700
commitbd0bf00081bb24af5cd67a9351b0b0c1a041d0d3 (patch)
treeaba7a10616ec4ee0651d2b951179651fd99cf489 /src/ao_radio_cmac.c
parenta731d240f802d37524ce84c3c6acf22bcda4d522 (diff)
altos: More work on AES bits
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_radio_cmac.c')
-rw-r--r--src/ao_radio_cmac.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ao_radio_cmac.c b/src/ao_radio_cmac.c
index 4b118d02..9b406a21 100644
--- a/src/ao_radio_cmac.c
+++ b/src/ao_radio_cmac.c
@@ -22,6 +22,7 @@
static __xdata uint8_t cmac_key[AO_CMAC_KEY_LEN];
static __xdata uint8_t cmac_data[AO_CMAC_MAX_LEN + AO_CMAC_KEY_LEN + 2 + AO_CMAC_KEY_LEN];
+static __pdata uint8_t ao_radio_cmac_len;
static uint8_t
getnibble(void)
@@ -85,6 +86,14 @@ ao_radio_cmac_send(void) __reentrant
ao_radio_send(cmac_data, ao_cmd_lex_i + AO_CMAC_KEY_LEN);
}
+static void
+ao_radio_cmac_recv(void) __reentrant
+{
+ ao_cmd_hex();
+ if (ao_cmd_status != ao_cmd_success)
+ return;
+}
+
__code struct ao_cmds ao_radio_cmac_cmds[] = {
{ ao_radio_cmac_key, "k <byte> ...\0Set AES-CMAC key." },
{ ao_radio_cmac_send, "s <length>\0Send AES-CMAC packet. Bytes to send follow on next line" },