|
|
@@ -38,6 +38,8 @@ |
|
|
|
#include <strobe_rng_init.h> |
|
|
|
#include <comms.h> |
|
|
|
|
|
|
|
#include <sysinit.h> |
|
|
|
|
|
|
|
enum { |
|
|
|
CMD_TERMINATE = 1, |
|
|
|
CMD_WAITFOR = 2, |
|
|
@@ -134,6 +136,7 @@ radio_seed_rng(void) |
|
|
|
} |
|
|
|
#endif |
|
|
|
} |
|
|
|
SYSINIT_VF(radio_seed_rng, SI_SUB_STANDARD, SI_ORDER_ANY, radio_seed_rng); |
|
|
|
|
|
|
|
static void |
|
|
|
analog_seed_rng(void) |
|
|
@@ -155,6 +158,7 @@ analog_seed_rng(void) |
|
|
|
} |
|
|
|
#endif |
|
|
|
} |
|
|
|
SYSINIT_VF(analog_seed_rng, SI_SUB_STANDARD, SI_ORDER_ANY, analog_seed_rng); |
|
|
|
|
|
|
|
static inline uint32_t |
|
|
|
letoh_32(uint8_t *v) |
|
|
@@ -206,6 +210,7 @@ setup_gpio() |
|
|
|
set_chan(i, chans[i].init); |
|
|
|
} |
|
|
|
} |
|
|
|
SYSINIT_VF(setup_gpio, SI_SUB_HAL, SI_ORDER_LAST, setup_gpio); |
|
|
|
|
|
|
|
static struct sched { |
|
|
|
uint32_t cmd; |
|
|
@@ -339,23 +344,18 @@ procmsg(struct pktbuf inbuf, struct pktbuf *outbuf) |
|
|
|
outbuf->pktlen = 1; |
|
|
|
} |
|
|
|
|
|
|
|
int |
|
|
|
main() |
|
|
|
void |
|
|
|
radio_init(void) |
|
|
|
{ |
|
|
|
|
|
|
|
strobe_rng_init(); |
|
|
|
|
|
|
|
BoardInitMcu(); |
|
|
|
|
|
|
|
Radio.Init(&revents); |
|
|
|
} |
|
|
|
|
|
|
|
analog_seed_rng(); |
|
|
|
|
|
|
|
radio_seed_rng(); |
|
|
|
|
|
|
|
strobe_rng_save(); |
|
|
|
SYSINIT_VF(radio_init, SI_SUB_HAL, SI_ORDER_MIDDLE, radio_init); |
|
|
|
|
|
|
|
setup_gpio(); |
|
|
|
int |
|
|
|
main() |
|
|
|
{ |
|
|
|
|
|
|
|
/* turn on LED */ |
|
|
|
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, GPIO_PIN_SET); |
|
|
|