summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-29 19:42:53 -0700
committerKeith Packard <keithp@keithp.com>2012-07-29 19:42:53 -0700
commite4d244eefa4c779cd9c8a91389bf998c54705b72 (patch)
tree944993d65177343683b46d7794dac562cfc99918 /src/core
parent21e39811bd234c6f66ab7644864fcc1b8c316998 (diff)
altos: Add software AES implementation
This is untested Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ao_aes.h2
-rw-r--r--src/core/ao_radio_cmac.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/core/ao_aes.h b/src/core/ao_aes.h
index 7f67374d..ab3e367e 100644
--- a/src/core/ao_aes.h
+++ b/src/core/ao_aes.h
@@ -29,9 +29,11 @@ enum ao_aes_mode {
};
#if HAS_AES
+#ifdef SDCC
void
ao_aes_isr(void) __interrupt 4;
#endif
+#endif
void
ao_aes_set_mode(enum ao_aes_mode mode);
diff --git a/src/core/ao_radio_cmac.c b/src/core/ao_radio_cmac.c
index e263f0db..7a377002 100644
--- a/src/core/ao_radio_cmac.c
+++ b/src/core/ao_radio_cmac.c
@@ -121,7 +121,7 @@ radio_cmac_recv(uint8_t len, uint16_t timeout) __reentrant
}
ao_radio_cmac_rssi = (int16_t) (((int8_t) cmac_data[len + AO_CMAC_KEY_LEN]) >> 1) - 74;
- if (!(cmac_data[len + AO_CMAC_KEY_LEN +1] & PKT_APPEND_STATUS_1_CRC_OK))
+ if (!(cmac_data[len + AO_CMAC_KEY_LEN +1] & AO_RADIO_STATUS_CRC_OK))
return AO_RADIO_CMAC_CRC_ERROR;
ao_config_get();
@@ -233,9 +233,9 @@ radio_cmac_recv_cmd(void) __reentrant
static __xdata struct ao_launch_command command;
static __xdata struct ao_launch_query query;
-static pdata uint16_t launch_serial;
-static pdata uint8_t launch_channel;
-static pdata uint16_t tick_offset;
+static __pdata uint16_t launch_serial;
+static __pdata uint8_t launch_channel;
+static __pdata uint16_t tick_offset;
static void
launch_args(void) __reentrant