X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fdrivers%2Fao_cc115l.c;h=a67071d24d879c44e348bb8ecb5ff8831e624e9c;hp=9e116d62b91601e961bc6a9c8e7c25fae58c4721;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hpb=80a0397dde2f787fb20fd2520b274b826c68ed5a diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index 9e116d62..a67071d2 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_1MHz) +#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_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) @@ -70,7 +71,7 @@ struct ao_cc115l_trace { const char *comment; }; -#define NUM_TRACE 256 +#define NUM_TRACE 32 static struct ao_cc115l_trace trace[NUM_TRACE]; static int trace_i; @@ -515,7 +516,13 @@ static uint8_t ao_radio_configured = 0; #if HAS_RADIO_POWER #define RADIO_POWER ao_config.radio_power #else -#define RADIO_POWER 0xc0 + +#if 0 +#define RADIO_POWER 0x03 /* -31.75dBm on the test board */ +#endif + +#define RADIO_POWER 0xc0 /* full power */ + #endif static void