diff options
author | Keith Packard <keithp@keithp.com> | 2014-06-05 17:24:57 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-06-05 17:24:57 -0700 |
commit | 2db2b75f8847ca0066bb19771653a65c9098ae52 (patch) | |
tree | 2238fa9008322b93c7ac807f590092359935de1c /src | |
parent | b8201bc9ba4a5f5f0522b68493cd5e7f013fd4bb (diff) |
altos: Allow cc115l driver to be built without radio power control
TeleGPS just wants full power, so remove the configuration option
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/ao_cc115l.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index d9b9a89b..f250e714 100644 --- a/src/drivers/ao_cc115l.c +++ b/src/drivers/ao_cc115l.c @@ -612,6 +612,12 @@ ao_radio_rdf_abort(void) #define POWER_STEP 0x08 +#if HAS_RADIO_POWER +#define RADIO_POWER ao_config.radio_power +#else +#define RADIO_POWER 0xc0 +#endif + static void ao_radio_stx(void) { @@ -619,9 +625,10 @@ ao_radio_stx(void) ao_radio_pa_on(); ao_radio_reg_write(CC115L_PA, 0); ao_radio_strobe(CC115L_STX); - for (power = POWER_STEP; power < ao_config.radio_power; power += POWER_STEP) + for (power = POWER_STEP; power < RADIO_POWER; power += POWER_STEP) ao_radio_reg_write(CC115L_PA, power); - ao_radio_reg_write(CC115L_PA, ao_config.radio_power); + if (power != RADIO_POWER) + ao_radio_reg_write(CC115L_PA, RADIO_POWER); } static void |