From 9aeed244879f90b5b6dab1c7ca095cc001b03fe5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 29 Mar 2013 12:13:59 -0700 Subject: 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 --- src/drivers/ao_cc115l.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/drivers/ao_cc115l.c') 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); } -- cgit v1.2.3