RADIO_PARAM_POWER_MODE for Atmel radio

modified:   cpu/avr/radio/rf230bb/rf230bb.c
	modified:   cpu/avr/radio/rf230bb/rf230bb.h
This commit is contained in:
Robert Olsson 2017-06-01 17:30:30 +02:00
parent b4ef18b2fa
commit bb90d50ba1
2 changed files with 3 additions and 8 deletions

View File

@ -396,13 +396,10 @@ get_value(radio_param_t param, radio_value_t *value)
switch(param) {
case RADIO_PARAM_POWER_MODE:
/* *value = (REG(RFCORE_XREG_RXENABLE) && RFCORE_XREG_RXENABLE_RXENMASK) == 0 )?
RADIO_POWER_MODE_OFF : RADIO_POWER_MODE_ON; */
*value = rf230_is_sleeping() ? RADIO_POWER_MODE_OFF : RADIO_POWER_MODE_ON;
return RADIO_RESULT_OK;
case RADIO_PARAM_TX_MODE:
return RADIO_RESULT_OK;
case RADIO_PARAM_CHANNEL:
*value = (radio_value_t)rf230_get_channel();
return RADIO_RESULT_OK;
@ -613,8 +610,7 @@ radio_get_trx_state(void)
* states.
* \retval false The radio transceiver is not sleeping.
*/
#if 0
static bool radio_is_sleeping(void)
static bool rf230_is_sleeping(void)
{
bool sleeping = false;
@ -626,7 +622,6 @@ static bool radio_is_sleeping(void)
return sleeping;
}
#endif
/*----------------------------------------------------------------------------*/
/** \brief This function will reset the state machine (to TRX_OFF) from any of
* its states, except for the SLEEP state.

View File

@ -223,7 +223,7 @@ uint8_t rf230_get_rpc(void);
void rf230_set_promiscuous_mode(bool isPromiscuous);
bool rf230_is_ready_to_send();
static bool rf230_is_sleeping(void);
extern uint8_t rf230_last_correlation,rf230_last_rssi,rf230_smallest_rssi;
uint8_t rf230_get_raw_rssi(void);