58 #if defined(__AVR_ATmega128RFA1__)
59 #include "atmega128rfa1_registermap.h"
69 #define SUPPORTED_PART_NUMBER (2)
70 #define RF230_REVA (1)
71 #define RF230_REVB (2)
73 #define SUPPORTED_MANUFACTURER_ID (31)
75 #if defined(__AVR_ATmega128RFA1__)
76 #define RF230_SUPPORTED_INTERRUPT_MASK (0xFF)
82 #define RF230_SUPPORTED_INTERRUPT_MASK (0x0C)
85 #define RF230_MIN_CHANNEL (11)
86 #define RF230_MAX_CHANNEL (26)
87 #define RF230_MIN_ED_THRESHOLD (0)
88 #define RF230_MAX_ED_THRESHOLD (15)
89 #define RF230_MAX_TX_FRAME_LENGTH (127)
92 #define TX_PWR_3DBM (0)
93 #define TX_PWR_17_2DBM (15)
95 #define TX_PWR_MAX TX_PWR_3DBM
96 #define TX_PWR_MIN TX_PWR_17_2DBM
97 #define TX_PWR_UNDEFINED (TX_PWR_MIN + 1)
99 #define BATTERY_MONITOR_HIGHEST_VOLTAGE (15)
100 #define BATTERY_MONITOR_VOLTAGE_UNDER_THRESHOLD (0)
101 #define BATTERY_MONITOR_HIGH_VOLTAGE (1)
102 #define BATTERY_MONITOR_LOW_VOLTAGE (0)
104 #define FTN_CALIBRATION_DONE (0)
105 #define PLL_DCU_CALIBRATION_DONE (0)
106 #define PLL_CF_CALIBRATION_DONE (0)
108 #define RC_OSC_REFERENCE_COUNT_MAX (1.005 * F_CPU * 31250UL / 8000000UL)
109 #define RC_OSC_REFERENCE_COUNT_MIN (0.995 * F_CPU * 31250UL / 8000000UL)
112 #define RF_CHANNEL 26
125 #define RADIO_STATUS_START_VALUE (0x40)
156 #define TRAC_SUCCESS 0
157 #define TRAC_SUCCESS_DATA_PENDING 1
158 #define TRAC_SUCCESS_WAIT_FOR_ACK 2
159 #define TRAC_CHANNEL_ACCESS_FAILURE 3
160 #define TRAC_NO_ACK 5
161 #define TRAC_INVALID 7
191 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);
214 void rf230_set_channel(uint8_t channel);
215 void rf230_listen_channel(uint8_t channel);
216 uint8_t rf230_get_channel(
void);
217 void rf230_set_pan_addr(
unsigned pan,
unsigned addr,
const uint8_t ieee_addr[8]);
218 void rf230_set_txpower(uint8_t power);
219 uint8_t rf230_get_txpower(
void);
221 void rf230_set_promiscuous_mode(
bool isPromiscuous);
222 bool rf230_is_ready_to_send();
224 extern uint8_t rf230_last_correlation, rf230_last_rssi, rf230_smallest_rssi;
226 uint8_t rf230_get_raw_rssi(
void);
228 #define rf230_rssi rf230_get_raw_rssi
The requested service timed out.
Measured battery voltage is lower than voltage threshold.
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.
This file contains low-level radio driver code.
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.
This file contains the register definitions for the AT86RF230.
The channel access failed during the auto mode.
Measured battery voltage is above the voltage threshold.