mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 03:30:01 +00:00
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:
parent
b4ef18b2fa
commit
bb90d50ba1
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user