altos: Make cmd number parsing functions return value
[fw/altos] / src / drivers / ao_cc115l.c
index a67071d24d879c44e348bb8ecb5ff8831e624e9c..a8f2c4f5102e2acf0bc7ca8d269d5de243508613 100644 (file)
@@ -39,7 +39,7 @@ static uint8_t ao_radio_abort;                /* radio operation should abort */
 
 #define FOSC   26000000
 
-#define ao_radio_select()      ao_spi_get_mask(AO_CC115L_SPI_CS_PORT,(1 << AO_CC115L_SPI_CS_PIN),AO_CC115L_SPI_BUS,AO_SPI_SPEED_6MHz)
+#define ao_radio_select()      ao_spi_get_mask(AO_CC115L_SPI_CS_PORT,(1 << AO_CC115L_SPI_CS_PIN),AO_CC115L_SPI_BUS,AO_CC115L_SPI_SPEED)
 #define ao_radio_deselect()    ao_spi_put_mask(AO_CC115L_SPI_CS_PORT,(1 << AO_CC115L_SPI_CS_PIN),AO_CC115L_SPI_BUS)
 #define ao_radio_spi_send(d,l) ao_spi_send((d), (l), AO_CC115L_SPI_BUS)
 #define ao_radio_spi_send_fixed(d,l) ao_spi_send_fixed((d), (l), AO_CC115L_SPI_BUS)
@@ -700,10 +700,8 @@ ao_radio_test_cmd(void)
        uint8_t mode = 2;
        static uint8_t radio_on;
        ao_cmd_white();
-       if (ao_cmd_lex_c != '\n') {
-               ao_cmd_decimal();
-               mode = (uint8_t) ao_cmd_lex_u32;
-       }
+       if (ao_cmd_lex_c != '\n')
+               mode = ao_cmd_decimal();
        mode++;
        if ((mode & 2) && !radio_on) {
 #if HAS_MONITOR