Microcontroller Wireless Solutions


pal_mcu_generic.h File Reference

PAL configuration generic for ATmega128RFA1. More...

Go to the source code of this file.

Defines

#define CLEAR_TRX_IRQ_AMI()   (IRQ_STATUS = _BV(AMI))
#define CLEAR_TRX_IRQ_AWAKE()   (IRQ_STATUS = _BV(AWAKE))
#define CLEAR_TRX_IRQ_BATMON()   (BATMON = _BV(BAT_LOW))
#define CLEAR_TRX_IRQ_CCA_ED()   (IRQ_STATUS = _BV(CCA_ED_DONE_EN))
#define CLEAR_TRX_IRQ_PLL_LOCK()   (IRQ_STATUS = _BV(PLL_LOCK))
#define CLEAR_TRX_IRQ_PLL_UNLOCK()   (IRQ_STATUS = _BV(PLL_UNLOCK))
#define CLEAR_TRX_IRQ_RX_END()   (IRQ_STATUS = _BV(RX_END))
#define CLEAR_TRX_IRQ_TSTAMP()   (IRQ_STATUS = _BV(RX_START))
#define CLEAR_TRX_IRQ_TX_END()   (IRQ_STATUS = _BV(TX_END))
#define DISABLE_GLOBAL_IRQ()   cli()
#define ENABLE_GLOBAL_IRQ()   sei()
#define ENTER_CRITICAL_REGION()   {uint8_t sreg = SREG; cli()
#define LEAVE_CRITICAL_REGION()   SREG = sreg;}
#define MAX_NO_OF_TIMERS   (25)
#define MAX_TIMEOUT   (0x7FFFFFFF)
#define MIN_TIMEOUT   (0x80)
#define pal_trx_bit_read(arg)   _pal_trx_bit_read(arg)
#define pal_trx_bit_write(arg1, val)   _pal_trx_bit_write(arg1, val)
#define pal_trx_frame_read(data, length)   memcpy((data), (void *)&TRXFBST, (length))
#define pal_trx_frame_write(data, length)   memcpy((void *)&TRXFBST, (data), (length))
#define pal_trx_reg_read(addr)   (*(volatile uint8_t *)(addr))
#define pal_trx_reg_write(addr, data)   (*(volatile uint8_t *)(addr)) = (data)
#define RST_HIGH()   (TRXPR |= _BV(TRXRST))
#define RST_LOW()   (TRXPR &= ~_BV(TRXRST))
#define SLP_TR_HIGH()   (TRXPR |= _BV(SLPTR))
#define SLP_TR_LOW()   (TRXPR &= ~_BV(SLPTR))

Typedefs

typedef enum
port_pin_direction_type_tag 
port_pin_direction_type_t
typedef enum port_type_tag port_type_t

Enumerations

enum  port_pin_direction_type_tag {
  DDR_B, DDR_D, DDR_E, DDR_F,
  DDR_G
}
enum  port_type_tag {
  PORT_B, PORT_D, PORT_E, PORT_F,
  PORT_G
}

Detailed Description

PAL configuration generic for ATmega128RFA1.

This header file contains generic configuration parameters for ATmega128RFA1.

Id:
pal_mcu_generic.h 27739 2011-07-18 07:22:38Z uwalter
Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com

Definition in file pal_mcu_generic.h.


Define Documentation

#define CLEAR_TRX_IRQ_AMI ( )    (IRQ_STATUS = _BV(AMI))

Clear AMI interrupt.

Definition at line 89 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_AWAKE ( )    (IRQ_STATUS = _BV(AWAKE))

Clear TRX AWAKE interrupt.

Definition at line 95 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_BATMON ( )    (BATMON = _BV(BAT_LOW))

Clear TRX BAT LOW interrupt.

Definition at line 92 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_CCA_ED ( )    (IRQ_STATUS = _BV(CCA_ED_DONE_EN))

Clear TRX CCA_ED_DONE interrupt.

Definition at line 86 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_PLL_LOCK ( )    (IRQ_STATUS = _BV(PLL_LOCK))

Clear TRX PLL LOCK interrupt.

Definition at line 98 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_PLL_UNLOCK ( )    (IRQ_STATUS = _BV(PLL_UNLOCK))

Clear TRX PLL UNLOCK interrupt.

Definition at line 101 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_RX_END ( )    (IRQ_STATUS = _BV(RX_END))

Clear TRX RX_END interrupt.

Definition at line 83 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_TSTAMP ( )    (IRQ_STATUS = _BV(RX_START))

Clear RX TIME STAMP interrupt.

Definition at line 80 of file pal_mcu_generic.h.

#define CLEAR_TRX_IRQ_TX_END ( )    (IRQ_STATUS = _BV(TX_END))

Clears TRX TX_END interrupt.

Definition at line 77 of file pal_mcu_generic.h.

#define DISABLE_GLOBAL_IRQ ( )    cli()

Disables the global interrupts.

Definition at line 114 of file pal_mcu_generic.h.

Referenced by pal_global_irq_disable().

#define ENABLE_GLOBAL_IRQ ( )    sei()

Enables the global interrupts.

Definition at line 111 of file pal_mcu_generic.h.

Referenced by pal_global_irq_enable().

#define ENTER_CRITICAL_REGION ( )    {uint8_t sreg = SREG; cli()
#define LEAVE_CRITICAL_REGION ( )    SREG = sreg;}
#define MAX_NO_OF_TIMERS   (25)

Maximum numbers of software timers running at a time.

Definition at line 215 of file pal_mcu_generic.h.

#define MAX_TIMEOUT   (0x7FFFFFFF)

The largest timeout in microseconds

Definition at line 211 of file pal_mcu_generic.h.

Referenced by pal_timer_start().

#define MIN_TIMEOUT   (0x80)

The smallest timeout in microseconds

Definition at line 208 of file pal_mcu_generic.h.

Referenced by pal_timer_start().

#define pal_trx_bit_read (   arg)    _pal_trx_bit_read(arg)

Subregister read.

Parameters:
argSubregister
Returns:
Value of the read subregister

Definition at line 187 of file pal_mcu_generic.h.

#define pal_trx_bit_write (   arg1,
  val 
)    _pal_trx_bit_write(arg1, val)

Subregister write.

Parameters:
[in]arg1Subregister
[out]valData, which is muxed into the register

Definition at line 204 of file pal_mcu_generic.h.

#define pal_trx_frame_read (   data,
  length 
)    memcpy((data), (void *)&TRXFBST, (length))

Reads frame buffer of the transceiver.

This macro reads the frame buffer of the transceiver.

Parameters:
[out]dataPointer to the location to store frame
[in]lengthNumber of bytes to be read from the frame buffer.

Definition at line 160 of file pal_mcu_generic.h.

#define pal_trx_frame_write (   data,
  length 
)    memcpy((void *)&TRXFBST, (data), (length))

Writes data into frame buffer of the transceiver.

This macro writes data into the frame buffer of the transceiver

Parameters:
[in]dataPointer to data to be written into frame buffer
[in]lengthNumber of bytes to be written into frame buffer

Definition at line 172 of file pal_mcu_generic.h.

#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.

Parameters:
addrSpecifies the address of the trx register from which the data shall be read
Returns:
value of the register read

Definition at line 147 of file pal_mcu_generic.h.

#define pal_trx_reg_write (   addr,
  data 
)    (*(volatile uint8_t *)(addr)) = (data)

Writes data into a transceiver register.

This macro writes a value into transceiver register.

Parameters:
addrAddress of the trx register
dataData to be written to trx register

Definition at line 133 of file pal_mcu_generic.h.

#define RST_HIGH ( )    (TRXPR |= _BV(TRXRST))

Set Reset Bit.

Definition at line 70 of file pal_mcu_generic.h.

#define RST_LOW ( )    (TRXPR &= ~_BV(TRXRST))

Clear Reset Bit.

Definition at line 71 of file pal_mcu_generic.h.

#define SLP_TR_HIGH ( )    (TRXPR |= _BV(SLPTR))

Set Sleep/TR Bit.

Definition at line 72 of file pal_mcu_generic.h.

#define SLP_TR_LOW ( )    (TRXPR &= ~_BV(SLPTR))

Clear Sleep/TR Bit.

Definition at line 73 of file pal_mcu_generic.h.


Typedef Documentation

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.


Enumeration Type Documentation

Enumerations used to identify port directions Note: ports A and C are not present on the ATmega128RFA1.

Definition at line 53 of file pal_mcu_generic.h.

Enumerations used to identify ports Note: ports A and C are not present on the ATmega128RFA1.

Definition at line 41 of file pal_mcu_generic.h.