PAL configuration generic for ATmega128RFA1.
This header file contains generic configuration parameters for ATmega128RFA1.
Macros | |
#define | _pal_trx_bit_read(addr, mask, pos) (((*(volatile uint8_t *)(addr)) & (mask)) >> (pos)) |
#define | _pal_trx_bit_write(addr, mask, pos, val) |
#define | CLEAR_TRX_IRQ_AMI() (IRQ_STATUS = _BV(AMI)) |
Clear AMI interrupt. More... | |
#define | CLEAR_TRX_IRQ_AWAKE() (IRQ_STATUS = _BV(AWAKE)) |
Clear TRX AWAKE interrupt. More... | |
#define | CLEAR_TRX_IRQ_BATMON() (BATMON = _BV(BAT_LOW)) |
Clear TRX BAT LOW interrupt. More... | |
#define | CLEAR_TRX_IRQ_CCA_ED() (IRQ_STATUS = _BV(CCA_ED_DONE_EN)) |
Clear TRX CCA_ED_DONE interrupt. More... | |
#define | CLEAR_TRX_IRQ_PLL_LOCK() (IRQ_STATUS = _BV(PLL_LOCK)) |
Clear TRX PLL LOCK interrupt. More... | |
#define | CLEAR_TRX_IRQ_PLL_UNLOCK() (IRQ_STATUS = _BV(PLL_UNLOCK)) |
Clear TRX PLL UNLOCK interrupt. More... | |
#define | CLEAR_TRX_IRQ_RX_END() (IRQ_STATUS = _BV(RX_END)) |
Clear TRX RX_END interrupt. More... | |
#define | CLEAR_TRX_IRQ_TSTAMP() (IRQ_STATUS = _BV(RX_START)) |
Clear RX TIME STAMP interrupt. More... | |
#define | CLEAR_TRX_IRQ_TX_END() (IRQ_STATUS = _BV(TX_END)) |
Clears TRX TX_END interrupt. More... | |
#define | DISABLE_GLOBAL_IRQ() cli() |
Disables the global interrupts. More... | |
#define | ENABLE_GLOBAL_IRQ() sei() |
Enables the global interrupts. More... | |
#define | ENTER_CRITICAL_REGION() {uint8_t sreg = SREG; cli() |
This macro saves the global interrupt status. More... | |
#define | LEAVE_CRITICAL_REGION() SREG = sreg;} |
This macro restores the global interrupt status. More... | |
#define | MAX_NO_OF_TIMERS (25) |
Maximum numbers of software timers running at a time. More... | |
#define | MAX_TIMEOUT (0x7FFFFFFF) |
The largest timeout in microseconds. More... | |
#define | MIN_TIMEOUT (0x80) |
The smallest timeout in microseconds. More... | |
#define | pal_trx_bit_read(arg) _pal_trx_bit_read(arg) |
Subregister read. More... | |
#define | pal_trx_bit_write(arg1, val) _pal_trx_bit_write(arg1, val) |
Subregister write. More... | |
#define | pal_trx_frame_read(data, length) memcpy((data), (void *)&TRXFBST, (length)) |
Reads frame buffer of the transceiver. More... | |
#define | pal_trx_frame_write(data, length) memcpy((void *)&TRXFBST, (data), (length)) |
Writes data into frame buffer of the transceiver. More... | |
#define | pal_trx_reg_read(addr) (*(volatile uint8_t *)(addr)) |
Reads current value from a transceiver register. More... | |
#define | pal_trx_reg_write(addr, data) (*(volatile uint8_t *)(addr)) = (data) |
Writes data into a transceiver register. More... | |
#define | RST_HIGH() (TRXPR |= _BV(TRXRST)) |
Set Reset Bit. More... | |
#define | RST_LOW() (TRXPR &= ~_BV(TRXRST)) |
Clear Reset Bit. More... | |
#define | SLP_TR_HIGH() (TRXPR |= _BV(SLPTR)) |
Set Sleep/TR Bit. More... | |
#define | SLP_TR_LOW() (TRXPR &= ~_BV(SLPTR)) |
Clear Sleep/TR Bit. More... | |
Typedefs | |
typedef enum port_pin_direction_type_tag | port_pin_direction_type_t |
Enumerations used to identify port directions Note: ports A and C are not present on the ATmega128RFA1. More... | |
typedef enum port_type_tag | port_type_t |
Enumerations used to identify ports Note: ports A and C are not present on the ATmega128RFA1. More... | |
Enumerations | |
enum | port_pin_direction_type_tag { DDR_B, DDR_D, DDR_E, DDR_F, DDR_G } |
Enumerations used to identify port directions Note: ports A and C are not present on the ATmega128RFA1. More... | |
enum | port_type_tag { PORT_B, PORT_D, PORT_E, PORT_F, PORT_G } |
Enumerations used to identify ports Note: ports A and C are not present on the ATmega128RFA1. More... | |
#define _pal_trx_bit_read | ( | addr, | |
mask, | |||
pos | |||
) | (((*(volatile uint8_t *)(addr)) & (mask)) >> (pos)) |
#define _pal_trx_bit_write | ( | addr, | |
mask, | |||
pos, | |||
val | |||
) |
#define CLEAR_TRX_IRQ_AWAKE | ( | ) | (IRQ_STATUS = _BV(AWAKE)) |
Clear TRX AWAKE interrupt.
#define CLEAR_TRX_IRQ_CCA_ED | ( | ) | (IRQ_STATUS = _BV(CCA_ED_DONE_EN)) |
Clear TRX CCA_ED_DONE interrupt.
#define CLEAR_TRX_IRQ_PLL_UNLOCK | ( | ) | (IRQ_STATUS = _BV(PLL_UNLOCK)) |
Clear TRX PLL UNLOCK interrupt.
#define CLEAR_TRX_IRQ_RX_END | ( | ) | (IRQ_STATUS = _BV(RX_END)) |
Clear TRX RX_END interrupt.
#define CLEAR_TRX_IRQ_TX_END | ( | ) | (IRQ_STATUS = _BV(TX_END)) |
Clears TRX TX_END interrupt.
#define DISABLE_GLOBAL_IRQ | ( | ) | cli() |
Disables the global interrupts.
#define ENABLE_GLOBAL_IRQ | ( | ) | sei() |
Enables the global interrupts.
#define ENTER_CRITICAL_REGION | ( | ) | {uint8_t sreg = SREG; cli() |
This macro saves the global interrupt status.
#define LEAVE_CRITICAL_REGION | ( | ) | SREG = sreg;} |
This macro restores the global interrupt status.
#define MAX_NO_OF_TIMERS (25) |
Maximum numbers of software timers running at a time.
#define MAX_TIMEOUT (0x7FFFFFFF) |
The largest timeout in microseconds.
#define MIN_TIMEOUT (0x80) |
The smallest timeout in microseconds.
#define pal_trx_bit_read | ( | arg | ) | _pal_trx_bit_read(arg) |
Subregister read.
arg | Subregister |
#define pal_trx_bit_write | ( | arg1, | |
val | |||
) | _pal_trx_bit_write(arg1, val) |
Subregister write.
[in] | arg1 | Subregister |
[out] | val | Data, which is muxed into the register |
Reads frame buffer of the transceiver.
This macro reads the frame buffer of the transceiver.
[out] | data | Pointer to the location to store frame |
[in] | length | Number of bytes to be read from the frame buffer. |
Writes data into frame buffer of the transceiver.
This macro writes data into the frame buffer of the transceiver
[in] | data | Pointer to data to be written into frame buffer |
[in] | length | Number of bytes to be written into frame buffer |
#define pal_trx_reg_read | ( | addr | ) | (*(volatile uint8_t *)(addr)) |
Reads current value from a transceiver register.
This macro reads the current value from a transceiver register.
addr | Specifies the address of the trx register from which the data shall be read |
Writes data into a transceiver register.
This macro writes a value into transceiver register.
addr | Address of the trx register |
data | Data to be written to trx register |
#define RST_HIGH | ( | ) | (TRXPR |= _BV(TRXRST)) |
Set Reset Bit.
#define RST_LOW | ( | ) | (TRXPR &= ~_BV(TRXRST)) |
Clear Reset Bit.
#define SLP_TR_HIGH | ( | ) | (TRXPR |= _BV(SLPTR)) |
Set Sleep/TR Bit.
#define SLP_TR_LOW | ( | ) | (TRXPR &= ~_BV(SLPTR)) |
Clear Sleep/TR Bit.
typedef enum port_pin_direction_type_tag port_pin_direction_type_t |
Enumerations used to identify port directions Note: ports A and C are not present on the ATmega128RFA1.
typedef enum port_type_tag port_type_t |
Enumerations used to identify ports Note: ports A and C are not present on the ATmega128RFA1.
enum port_type_tag |