diff options
author | Keith Packard <keithp@keithp.com> | 2013-03-29 12:13:59 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-03-29 12:13:59 -0700 |
commit | 9aeed244879f90b5b6dab1c7ca095cc001b03fe5 (patch) | |
tree | 4e8114a4b927d2117cf6a6a24dfdb5e21d38b02e /src/drivers/ao_cc115l.c | |
parent | 86e1039e14304ac13db540f2ee3afd4ff170b8b4 (diff) |
altos: Add temporary RF power settings
These expose the raw cc115l and rfpa0133 register settings so that we
can calibrate them against measured power outputs.
I've tested them to verify that they change how much power the board
consumes, so they're clearly doing something...
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_cc115l.c')
-rw-r--r-- | src/drivers/ao_cc115l.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index feff82af..5b0ec3d7 100644 --- a/src/drivers/ao_cc115l.c +++ b/src/drivers/ao_cc115l.c @@ -452,6 +452,7 @@ static void ao_radio_get(uint8_t len) { static uint32_t last_radio_setting; + static uint8_t last_power_setting; ao_mutex_get(&ao_radio_mutex); if (!ao_radio_configured) @@ -462,6 +463,10 @@ ao_radio_get(uint8_t len) ao_radio_reg_write(CC115L_FREQ0, ao_config.radio_setting); last_radio_setting = ao_config.radio_setting; } + if (ao_config.radio_power != last_power_setting) { + ao_radio_reg_write(CC115L_PA, ao_config.radio_power); + last_power_setting = ao_config.radio_power; + } ao_radio_set_len(len); } |