58 #if defined(__AVR_ATmega128RFA1__)
59 #include "atmega128rfa1_registermap.h"
66 #define SUPPORTED_PART_NUMBER ( 2 )
67 #define RF230_REVA ( 1 )
68 #define RF230_REVB ( 2 )
69 #define SUPPORTED_MANUFACTURER_ID ( 31 )
71 #if defined(__AVR_ATmega128RFA1__)
72 #define RF230_SUPPORTED_INTERRUPT_MASK ( 0xFF )
78 #define RF230_SUPPORTED_INTERRUPT_MASK ( 0x0C ) //disable bat low, trx underrun, pll lock/unlock
81 #define RF230_MIN_CHANNEL ( 11 )
82 #define RF230_MAX_CHANNEL ( 26 )
83 #define RF230_MIN_ED_THRESHOLD ( 0 )
84 #define RF230_MAX_ED_THRESHOLD ( 15 )
85 #define RF230_MAX_TX_FRAME_LENGTH ( 127 )
87 #define TX_PWR_3DBM ( 0 )
88 #define TX_PWR_17_2DBM ( 15 )
90 #define TX_PWR_MAX TX_PWR_3DBM
91 #define TX_PWR_MIN TX_PWR_17_2DBM
92 #define TX_PWR_UNDEFINED (TX_PWR_MIN+1)
95 #define BATTERY_MONITOR_HIGHEST_VOLTAGE ( 15 )
96 #define BATTERY_MONITOR_VOLTAGE_UNDER_THRESHOLD ( 0 )
97 #define BATTERY_MONITOR_HIGH_VOLTAGE ( 1 )
98 #define BATTERY_MONITOR_LOW_VOLTAGE ( 0 )
100 #define FTN_CALIBRATION_DONE ( 0 )
101 #define PLL_DCU_CALIBRATION_DONE ( 0 )
102 #define PLL_CF_CALIBRATION_DONE ( 0 )
104 #define RC_OSC_REFERENCE_COUNT_MAX (1.005*F_CPU*31250UL/8000000UL)
105 #define RC_OSC_REFERENCE_COUNT_MIN (0.995*F_CPU*31250UL/8000000UL)
108 #define RF_CHANNEL 26
121 #define RADIO_STATUS_START_VALUE ( 0x40 )
153 #define TRAC_SUCCESS 0
154 #define TRAC_SUCCESS_DATA_PENDING 1
155 #define TRAC_SUCCESS_WAIT_FOR_ACK 2
156 #define TRAC_CHANNEL_ACCESS_FAILURE 3
157 #define TRAC_NO_ACK 5
158 #define TRAC_INVALID 7
189 typedef void (*radio_rx_callback) (uint16_t data);
209 int rf230_init(
void);
210 void rf230_warm_reset(
void);
211 void rf230_start_sneeze(
void);
212 void rf230_set_channel(uint8_t channel);
213 void rf230_listen_channel(uint8_t channel);
214 uint8_t rf230_get_channel(
void);
215 void rf230_set_pan_addr(
unsigned pan,
unsigned addr,
const uint8_t ieee_addr[8]);
216 void rf230_set_txpower(uint8_t power);
217 uint8_t rf230_get_txpower(
void);
219 void rf230_set_promiscuous_mode(
bool isPromiscuous);
220 bool rf230_is_ready_to_send();
222 extern uint8_t rf230_last_correlation,rf230_last_rssi,rf230_smallest_rssi;
224 uint8_t rf230_get_raw_rssi(
void);
226 #define rf230_rssi rf230_get_raw_rssi
The requested service timed out.
Measured battery voltage is lower than voltage threshold.
This file contains the register definitions for the AT86RF230.
Use energy detection above threshold mode.
Channel is clear, available to transmit a new frame.
The connected device is not an Atmel AT86RF230.
The structure of a device driver for a radio in Contiki.
#define RADIO_STATUS_START_VALUE
This macro defines the start value for the RADIO_* status constants.
The requested state transition could not be completed.
The end-user tried to do an invalid state transition.
Use a combination of both energy detection and carrier sense.
No acknowledge frame was received.
Transceiver is busy receiving or transmitting data.
radio_status_t
This enumeration defines the possible return values for the TAT API functions.
The requested service was performed successfully.
The radio transceiver is busy receiving or transmitting.
radio_clkm_speed_t
This enumeration defines the possible CLKM speeds.
The CRC failed for the actual frame.
radio_cca_mode_t
This enumeration defines the possible modes available for the Clear Channel Assessment algorithm...
One or more of the supplied function arguments are invalid.
The channel access failed during the auto mode.
This file contains low-level radio driver code.
Measured battery voltage is above the voltage threshold.