AVR Z-LINKŪ


Hardware Abstraction Layer Board Specific Configuration


Detailed Description

This set of macros are provided so that the hal is easy to port to any AVR device and board configuration. The porting is simply done by changing the macros accordingly to the schematic and selected device. The clock settings ensure that any of the supported clock frequencies are supported seamlessly during compile time. Default pin configuration (RCBs):
  1. Chip Select: PB0
  2. SPI Clock Signal: PB1
  3. MOSI: PB2
  4. MISO: PB3
  5. SLP_TR: PB4
  6. RST: PB5
  7. CLKM: Not Used
  8. IRQ: Timer1 Input Capture pin. Could also use pin change or external interrupt.

Application note:
AVR2001: AT86RF230 Software Programmer's Guide
Documentation
For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html
Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
$Name$
Revision
613
$RCSfile$
Date
2006-04-07 14:40:07 +0200 (fr, 07 apr 2006)

Copyright (c) 2006, Atmel Corporation All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. The name of ATMEL may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


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_ENABLE_INPUT_CAPTURE_INTERRUPT()   ( TIMSK1 |= ( 1 << ICIE1 ) )
 Macros defined for HAL_TIMER1.
#define HAL_PORT_SPI   ( PORTB )
 The SPI module is located on PORTB.
#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 DDR_RST   ( DDRB )

Data Direction Register that corresponds to the port where RST is connected.

Definition at line 130 of file hal_avr.h.

Referenced by hal_init().

#define DDR_SLP_TR   ( DDRB )

Data Direction Register that corresponds to the port where SLP_TR is connected.

Definition at line 89 of file hal_avr.h.

Referenced by hal_init().

#define HAL_DD_MISO   ( 0x03 )

Data Direction bit for MISO.

Definition at line 195 of file hal_avr.h.

#define HAL_DD_MOSI   ( 0x02 )

Data Direction bit for MOSI.

Definition at line 190 of file hal_avr.h.

Referenced by hal_init().

#define HAL_DD_SCK   ( 0x01 )

Data Direction bit for SCK.

Definition at line 185 of file hal_avr.h.

Referenced by hal_init().

#define HAL_DD_SS   ( 0x00 )

Data Direction bit for SS.

Definition at line 180 of file hal_avr.h.

Referenced by hal_init().

#define HAL_DDR_SPI   ( DDRB )

Data Direction Register for PORTB.

Definition at line 175 of file hal_avr.h.

Referenced by hal_init().

 
#define HAL_ENABLE_INPUT_CAPTURE_INTERRUPT (  )     ( TIMSK1 |= ( 1 << ICIE1 ) )

Macros defined for HAL_TIMER1.

These macros are used to define the correct setupt of the AVR's Timer1, and to ensure that the hal_get_system_time function returns the system time in symbols (16 us ticks).

Definition at line 229 of file hal_avr.h.

#define HAL_PORT_SPI   ( PORTB )

The SPI module is located on PORTB.

Definition at line 170 of file hal_avr.h.

Referenced by hal_init().

#define HAL_SS_PIN   ( 0x00 )

The slave select pin is PB0.

Definition at line 165 of file hal_avr.h.

#define PIN_RST   ( PINB )

Pin (Read Access) where RST is connected.

Definition at line 140 of file hal_avr.h.

#define PIN_SLP_TR   ( PINB )

Pin (Read Access) where SLP_TR is connected.

Definition at line 99 of file hal_avr.h.

#define PORT_RST   ( PORTB )

Port (Write Access) where RST is connected.

Definition at line 135 of file hal_avr.h.

#define PORT_SLP_TR   ( PORTB )

Port (Write Access) where SLP_TR is connected.

Definition at line 94 of file hal_avr.h.

#define RST   ( 0x05 )

Pin number that corresponds to the RST pin.

Definition at line 124 of file hal_avr.h.

Referenced by hal_init().

#define SLP_TR   ( 0x04 )

Pin number that corresponds to the SLP_TR pin.

Definition at line 83 of file hal_avr.h.

Referenced by hal_init().

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