# board_rzusb.h File Reference

## Detailed Description

Atmel Raven Development Kit, USB Stick, AT86RF230 Radio Adapter with Atmega1287.

This board wiring fits the Atmel radio development kit hardware.

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

         AVR            RF230
         ---            -----
         PB4      -->  SLPTR
         PD6/T1   <--  MCLK
         PD4/ICP1 <--  IRQ
         PB5      -->  RSTN
         PB0      -->  SEL
         PB2      -->  MOSI
         PB3      <--  MISO
         PB1      -->  SCLK
         PB7      -->  TST

         Schematic   AVR  Index
         ---------   ---  -----
         LED2:       PD5  (#0) red
         LED3:       PE7  (#1) green
         LED4:       PE6  (#2) yellow
         LED1:       PD7  (#3) blue (VBUS, USB supply)

    Fuses/Locks?????:
         LF: 0xe2 - 8MHz internal RC Osc.
         HF: 0x11 - without boot loader
         HF: 0x10 - with boot loader
         EF: 0xff
         LOCK: 0xef - protection of boot section

    Original Fuses/Locks
         LF: 0xde
         HF: 0x91
         EF: 0xfb
         LOCK: 0xff

    Bootloader:
        Start at byte=0x1e000, address=0xf000, size = 4096 instructions/ 8192 bytes

Build Options

- rzusb : Raven USB Stick

Definition in file board_rzusb.h.

Go to the source code of this file.

## Defines
#define | BOARD_NAME BOARD_NAME_RZUSB
#define | BOARD_TYPE RZ_USB230
#define | HIF_TYPE (HIF_AT90USB)
#define | HWTIMER_REG (TCNT1)
#define | HWTIMER_TICK ((1.0*HWTMR_PRESCALE)/F_CPU)
#define | HWTIMER_TICK_NB (0xFFFFUL)
#define | HWTMR_PRESCALE (1)
#define | LED_ACTIVITY (0)
#define | LED_CLR(x)
#define | LED_GET_VALUE()
#define | LED_INIT()
#define | LED_NUMBER (3)
#define | LED_SET(x)
#define | LED_SET_VALUE(x)
#define | LED_TOGGLE(ln)
#define | LED_USB_CONFIGURED (3)
#define | LED_VAL(msk, val) do{}while(0)
#define | MAX_FRAME_SIZE (127)
#define | NO_KEYS
#define | TIMER_INIT()
#define | TIMER_IRQ_vect TIMER1_OVF_vect
#define | TIMER_POOL_SIZE (4)
#define | TIMER_TICK (HWTIMER_TICK_NB * HWTIMER_TICK)
#define | TUNED_OSCCAL (0xbf)
#define | USB_BCD_RELEASE URACOLI_USB_BCD_RELEASE
#define | USB_PID URACOLI_USB_PID
#define | USB_PRODUCT_NAME URACOLI_USB_PRODUCT_NAME
#define | USB_VENDOR_NAME URACOLI_USB_VENDOR_NAME
#define | USB_VID URACOLI_USB_VID

## Define Documentation

#define LED_CLR | ( | x |  | ) |

Value:

    switch (x) { \
      case 3: PORTD &= ~_BV(7); break; \
      case 0: PORTD |= _BV(5); break; \
      case 1: PORTE |= _BV(7); break; \
      case 2: PORTE |= _BV(6); break; \
      }

Definition at line 132 of file board_rzusb.h.

#define LED_GET_VALUE | ( |  | ) |

Value:

    ( \
      ((PORTD & _BV(5))? 0: 1) | \
      ((PORTE & _BV(7))? 0: 2) | \
      ((PORTE & _BV(6))? 0: 4) \
                  )

Definition at line 147 of file board_rzusb.h.

#define LED_INIT | ( |  | ) |

Value:

    do { \
      DDRD |= _BV(7) | _BV(5); DDRE |= _BV(7) | _BV(6); \
      PORTD &= ~_BV(7); PORTD |= _BV(5); PORTE |= _BV(7) | _BV(6); \
      } while (0)

Definition at line 118 of file board_rzusb.h.

#define LED_SET | ( | x |  | ) |

Value:

    switch (x) { \
      case 3: PORTD |= _BV(7); break; \
      case 0: PORTD &= ~_BV(5); break; \
      case 1: PORTE &= ~_BV(7); break; \
      case 2: PORTE &= ~_BV(6); break; \
      }

Definition at line 124 of file board_rzusb.h.

#define LED_SET_VALUE | ( | x |  | ) |

Value:

    do { \
      if (x & 1) PORTD &= ~_BV(5); else PORTD |= _BV(5); \
      if (x & 2) PORTE &= ~_BV(7); else PORTE |= _BV(7); \
      if (x & 4) PORTE &= ~_BV(6); else PORTE |= _BV(6); \
      } while (0)

Definition at line 140 of file board_rzusb.h.

#define LED_TOGGLE | ( | ln |  | ) |

Value:

    switch (ln) { \
      case 3: PORTD ^= _BV(7); break; \
      case 0: PORTD ^= _BV(5); break; \
      case 1: PORTE ^= _BV(7); break; \
      case 2: PORTE ^= _BV(6); break; \
      }

Definition at line 155 of file board_rzusb.h.

#define LED_VAL | ( | msk,
|  | val |  | ) | do{}while(0)

Todo:
  how to implement this?

Definition at line 153 of file board_rzusb.h.

#define MAX_FRAME_SIZE (127)

maximum allowed frame size

Definition at line 100 of file board_rzusb.h.

#define TIMER_INIT | ( |  | ) |

Value:

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

Definition at line 189 of file board_rzusb.h.