This function checks to make sure the radio chip is present on the SPI
bus.
Signed-off-by: Keith Packard <keithp@keithp.com>
{ 0, NULL }
};
+/* Make sure the radio is alive */
+bool
+ao_radio_post(void)
+{
+ uint8_t partnum;
+
+ partnum = ao_radio_reg_read(CC1200_PARTNUMBER);
+ switch (partnum) {
+ case CC1200_PARTNUMBER_CC1200:
+ case CC1200_PARTNUMBER_CC1201:
+ return true;
+ default:
+ return false;
+ }
+}
+
void
ao_radio_init(void)
{
void
ao_radio_test_off(void);
+bool
+ao_radio_post(void);
+
void
ao_radio_init(void);