# board_lgee.h File Reference

## Detailed Description

Definition of Accelerometer Sensor Board by Daniel Thiele.

The wiring of the radio and the ATmega88 is shown below:

         Transceiver
         AVR         AT86RF231
         ---        ----------
         PC0    -->   SLPTR
         XTAL1  <--   MCLK
         PD2    <--   IRQ (INT2)
         PC1    -->   RSTN
         PB0    -->   /SEL
         PB3    -->   MOSI
         PB4    <--   MISO
         PB5    -->   SCK

         Accelerometer
         AVR        MMA7455L
         ---        --------
         PB2    -->   CS
         PB3    -->   MOSI
         PB4    -->   MISO
         PB5    -->   SCK
         PD3    -->   INT1/DRDY
         PD4    -->   INT2

       Fuses/Locks:
         LF: 0xd2 - 8MHz internal RC Osc.
         HF: 0xDF
         EF: 0x01

    Bootloader:
        Start at byte=...., address=....., size = 4096 instructions/ 8192 bytes

littleGee Accellerometer Sensor Board

Definition in file board_lgee.h.

Go to the source code of this file.

## Defines
#define | BOARD_HAS_ACC_MMA7455 (1)
#define | BOARD_LGEE231_H (1)
#define | CPU_TYPE (CPU_M88)
#define | DDR_SPI (DDRB)
#define | DEFAULT_SPI_RATE (SPI_RATE_1_2)
#define | HWTIMER_REG (TCNT1)
#define | HWTIMER_TICK ((1.0*HWTMR_PRESCALE)/F_CPU)
#define | HWTIMER_TICK_NB (0xFFFFUL)
#define | HWTMR_PRESCALE (1)
#define | MAX_FRAME_SIZE (127)
#define | NO_KEYS (1)
#define | PORT_SPI (PORTB)
#define | SPI_DATA_REG SPDR
#define | SPI_SELN_HIGH() PORT_SPI |= SPI_SS; SREG = sreg
#define | SPI_SELN_LOW() uint8_t sreg = SREG; cli(); PORT_SPI &=~SPI_SS
#define | SPI_TYPE SPI_TYPE_SPI
#define | SPI_WAITFOR() do { while((SPSR & _BV(SPIF)) == 0);} while(0)
#define | TIMER_INIT()
#define | TIMER_IRQ_vect TIMER1_OVF_vect
#define | TIMER_POOL_SIZE (4)
#define | TIMER_TICK (HWTIMER_TICK_NB * HWTIMER_TICK)
#define | TRX_TSTAMP_REG TCNT1
#define | TUNED_OSCCAL (0xbf)
## Functions
static void | SPI_INIT (uint8_t spirate)
| inline function for SPI initialization

## Define Documentation

#define BOARD_HAS_ACC_MMA7455 (1)

Freescale® accelerometer

Definition at line 333 of file board_lgee.h.

#define BOARD_LGEE231_H (1)

ID String for this hardware

Definition at line 96 of file board_lgee.h.

#define CPU_TYPE (CPU_M88)

used CPU (see const.h)

Definition at line 107 of file board_lgee.h.

#define DDR_SPI (DDRB)

DDR register for SPI port

Definition at line 218 of file board_lgee.h.

#define HWTMR_PRESCALE (1)

Type of the host interface.

Definition at line 314 of file board_lgee.h.

#define MAX_FRAME_SIZE (127)

maximum allowed frame size

Definition at line 99 of file board_lgee.h.

#define NO_KEYS (1)

if defined, no KEYS are connected

Definition at line 300 of file board_lgee.h.

#define PORT_SPI (PORTB)

PORT register for SPI port

Definition at line 219 of file board_lgee.h.

#define SPI_DATA_REG SPDR

abstraction for SPI data register

Definition at line 241 of file board_lgee.h.

#define SPI_SELN_HIGH | ( |  | ) | PORT_SPI |= SPI_SS; SREG = sreg

set SS line to high level

Definition at line 267 of file board_lgee.h.

#define SPI_SELN_LOW | ( |  | ) | uint8_t sreg = SREG; cli(); PORT_SPI &=~SPI_SS

set SS line to low level

Definition at line 265 of file board_lgee.h.

#define SPI_WAITFOR | ( |  | ) | do { while((SPSR & _BV(SPIF)) == 0);} while(0)

wait until SPI transfer is ready

Definition at line 269 of file board_lgee.h.

#define TIMER_INIT | ( |  | ) |

Value:

    do{ \
            TCCR1B |= (_BV(CS10)); \
            TIMSK1 |= _BV(TOIE1); \
        }while(0)

Definition at line 320 of file board_lgee.h.

#define TRX_TSTAMP_REG TCNT1

timestamp register for RX_START event (either TCNTx or ICRx)

Definition at line 214 of file board_lgee.h.

## Function Documentation

static void SPI_INIT | ( | uint8_t | spirate | ) | `[static]`

inline function for SPI initialization

Definition at line 247 of file board_lgee.h.