X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_cc115l.c;h=2b5fd3fd9313ffaf636b78649752ed74a42a05f3;hb=efc2c093819b3ec2e5743126efb76d3a9c0ad231;hp=24180f345cc6905856ad097884f83e386c113bef;hpb=36a08dc89ece6e2a2f0f69e3b31da17d66ceb2e2;p=fw%2Faltos diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index 24180f34..2b5fd3fd 100644 --- a/src/drivers/ao_cc115l.c +++ b/src/drivers/ao_cc115l.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -38,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) @@ -595,7 +596,7 @@ uint8_t ao_radio_tone_count; uint8_t ao_radio_tone_current; uint8_t ao_radio_tone_offset; -int16_t +static int16_t ao_radio_tone_fill(uint8_t *buf, int16_t len) { int16_t ret = 0; @@ -699,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