AVR Z-LINKŪ


hal_avr.h File Reference


Detailed Description

This file implements the HAL API for the AT86RF230 radio transceiver.

Definition in file hal_avr.h.

#include <stdint.h>
#include <stdbool.h>

Include dependency graph for hal_avr.h:

Go to the source code of this file.

Defines

#define DDR_RST   ( DDRB )
 Data Direction Register that corresponds to the port where RST is connected.
#define DDR_SLP_TR   ( DDRB )
 Data Direction Register that corresponds to the port where SLP_TR is connected.
#define HAL_DD_MISO   ( 0x03 )
 Data Direction bit for MISO.
#define HAL_DD_MOSI   ( 0x02 )
 Data Direction bit for MOSI.
#define HAL_DD_SCK   ( 0x01 )
 Data Direction bit for SCK.
#define HAL_DD_SS   ( 0x00 )
 Data Direction bit for SS.
#define HAL_DDR_SPI   ( DDRB )
 Data Direction Register for PORTB.
#define HAL_DISABLE_INPUT_CAPTURE_INTERRUPT()   ( TIMSK1 &= ~( 1 << ICIE1 ) )
#define HAL_DISABLE_OVERFLOW_INTERRUPT()   ( TIMSK1 &= ~( 1 << TOIE1 ) )
#define hal_disable_trx_interrupt()   ( HAL_DISABLE_INPUT_CAPTURE_INTERRUPT( ) )
 Disable the interrupt from the radio transceiver.
#define HAL_ENABLE_INPUT_CAPTURE_INTERRUPT()   ( TIMSK1 |= ( 1 << ICIE1 ) )
 Macros defined for HAL_TIMER1.
#define HAL_ENABLE_OVERFLOW_INTERRUPT()   ( TIMSK1 |= ( 1 << TOIE1 ) )
#define hal_enable_trx_interrupt()   ( HAL_ENABLE_INPUT_CAPTURE_INTERRUPT( ) )
 Enable the interrupt from the radio transceiver.
#define hal_get_rst()   ( ( PIN_RST & ( 1 << RST ) ) >> RST )
 Read current state of the RST pin (High/Low).
#define hal_get_slptr()   ( ( PIN_SLP_TR & ( 1 << SLP_TR ) ) >> SLP_TR )
 Read current state of the SLP_TR pin (High/Low).
#define HAL_PORT_SPI   ( PORTB )
 The SPI module is located on PORTB.
#define hal_set_rst_high()   ( PORT_RST |= ( 1 << RST ) )
 This macro pulls the RST pin high.
#define hal_set_rst_low()   ( PORT_RST &= ~( 1 << RST ) )
 This macro pulls the RST pin low.
#define hal_set_slptr_high()   ( PORT_SLP_TR |= ( 1 << SLP_TR ) )
 This macro pulls the SLP_TR pin high.
#define hal_set_slptr_low()   ( PORT_SLP_TR &= ~( 1 << SLP_TR ) )
 This macro pulls the SLP_TR pin low.
#define HAL_SS_HIGH()   (HAL_PORT_SPI |= ( 1 << HAL_SS_PIN ))
 MACRO for pulling SS high.
#define HAL_SS_LOW()   (HAL_PORT_SPI &= ~( 1 << HAL_SS_PIN ))
 MACRO for pulling SS low.
#define HAL_SS_PIN   ( 0x00 )
 The slave select pin is PB0.
#define PIN_RST   ( PINB )
 Pin (Read Access) where RST is connected.
#define PIN_SLP_TR   ( PINB )
 Pin (Read Access) where SLP_TR is connected.
#define PORT_RST   ( PORTB )
 Port (Write Access) where RST is connected.
#define PORT_SLP_TR   ( PORTB )
 Port (Write Access) where SLP_TR is connected.
#define RST   ( 0x05 )
 Pin number that corresponds to the RST pin.
#define SLP_TR   ( 0x04 )
 Pin number that corresponds to the SLP_TR pin.


Define Documentation

 
#define HAL_DISABLE_INPUT_CAPTURE_INTERRUPT (  )     ( TIMSK1 &= ~( 1 << ICIE1 ) )

Definition at line 230 of file hal_avr.h.

 
#define HAL_DISABLE_OVERFLOW_INTERRUPT (  )     ( TIMSK1 &= ~( 1 << TOIE1 ) )

Definition at line 233 of file hal_avr.h.

 
#define HAL_ENABLE_OVERFLOW_INTERRUPT (  )     ( TIMSK1 |= ( 1 << TOIE1 ) )

Definition at line 232 of file hal_avr.h.

Referenced by hal_init().

 
#define HAL_SS_HIGH (  )     (HAL_PORT_SPI |= ( 1 << HAL_SS_PIN ))

MACRO for pulling SS high.

Definition at line 197 of file hal_avr.h.

Referenced by hal_frame_read(), hal_frame_write(), hal_register_read(), hal_register_write(), hal_sram_read(), hal_sram_write(), and ISR().

 
#define HAL_SS_LOW (  )     (HAL_PORT_SPI &= ~( 1 << HAL_SS_PIN ))

MACRO for pulling SS low.

Definition at line 198 of file hal_avr.h.

Referenced by hal_frame_read(), hal_frame_write(), hal_register_read(), hal_register_write(), hal_sram_read(), hal_sram_write(), and ISR().

@DOC_TITLE@
Generated on Wed Jul 11 18:16:31 2007 for AVR2001 AT86RF230 Software Programmer's Manual by doxygen 1.4.7