Loading...
Searching...
No Matches
board.h File Reference

Board specific definitions for the Waspmote PRO v1.2 board. More...

Detailed Description

Board specific definitions for the Waspmote PRO v1.2 board.

Author
Hinnerk van Bruinehsen h.v.b.nosp@m.ruin.nosp@m.ehsen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Francisco Acosta franc.nosp@m.isco.nosp@m..acos.nosp@m.ta@i.nosp@m.nria..nosp@m.fr

Definition in file board.h.

#include "cpu.h"
#include "waspmote_pinmap.h"
+ Include dependency graph for board.h:

Go to the source code of this file.

Macros

#define MTD_0   mtd_dev_get(0)
 Default MTD device.
 
#define STDIO_UART_BAUDRATE   (9600U)
 As the CPU is too slow to handle 115200 baud, we set the default baudrate to 9600 for this board.
 

LED pin definitions

Use the UART 0 for STDIO on this board, if the XBee socket is not being used

#define LED0_PORT   PORTD
 
#define LED1_PORT   PORTC
 
#define LED0_PIN   (1 << 6)
 
#define LED1_PIN   (1 << 1)
 

Macros for controlling the on-board LEDs.

#define LED0_ENABLE_PORT   DDRD |= (1 << DDD6)
 
#define LED0_ON   LED0_PORT |= LED0_PIN
 
#define LED0_OFF   LED0_PORT &= ~LED0_PIN
 
#define LED0_TOGGLE   LED0_PORT ^= LED0_PIN;
 
#define LED1_ENABLE_PORT   DDRC |= (1 << DDC1)
 
#define LED1_ON   LED1_PORT |= LED1_PIN
 
#define LED1_OFF   LED1_PORT &= ~LED1_PIN
 
#define LED1_TOGGLE   LED1_PORT ^= LED1_PIN;
 
#define LED_GREEN_ON   LED1_ON
 
#define LED_GREEN_OFF   LED1_OFF
 
#define LED_GREEN_TOGGLE   LED1_TOGGLE
 
#define LED_RED_ON   LED0_ON
 
#define LED_RED_OFF   LED0_OFF
 
#define LED_RED_TOGGLE   LED0_TOGGLE
 

Usage of LED to turn on when a kernel panic occurs.

#define LED_PANIC   LED_RED_ON
 

Macros for controlling the on-board MUXes.

#define MUX_PW_PORT   PORTD
 
#define MUX0_PORT   PORTB
 
#define MUX1_PORT   PORTB
 
#define MUX_USB_XBEE_PORT   PORTD
 
#define MUX_PW_PIN   (1 << 7)
 
#define MUX0_PIN   (1 << 6)
 
#define MUX1_PIN   (1 << 7)
 
#define MUX_USB_XBEE_PIN   (1 << 5)
 
#define MUX_PW_ENABLE_PORT   DDRD |= (1 << DDD7);
 
#define MUX_PW_ON   MUX_PW_PORT |= MUX_PW_PIN
 
#define MUX_PW_OFF   MUX_PW_PORT &= ~MUX_PW_PIN
 
#define MUX0_ENABLE_PORT   DDRB |= (1 << DDB6)
 
#define MUX0_ON   MUX0_PORT |= MUX0_PIN
 
#define MUX0_OFF   MUX0_PORT &= ~MUX0_PIN
 
#define MUX1_ENABLE_PORT   DDRB |= (1 << DDB7)
 
#define MUX1_ON   MUX1_PORT |= MUX1_PIN
 
#define MUX1_OFF   MUX1_PORT &= ~MUX1_PIN
 
#define MUX_USB_XBEE_ENABLE_PORT   DDRD |= (1 << DDD5)
 
#define MUX_USB_XBEE_ON   MUX_USB_XBEE_PORT |= MUX_USB_XBEE_PIN
 
#define MUX_USB_XBEE_OFF   MUX_USB_XBEE_PORT &= ~MUX_USB_XBEE_PIN
 
#define SET_MUX_GPS
 
#define SET_MUX_SOCKET1
 
#define SET_MUX_AUX1_MODULE
 
#define SET_MUX_AUX2_MODULE
 
#define SET_MUX_USB_MODULE
 
#define SET_MUX_SOCKET0
 

CPU clock scale for waspmote-pro

#define CPU_ATMEGA_CLK_SCALE_INIT   CPU_ATMEGA_CLK_SCALE_DIV1
 

xtimer configuration values

Warning
This configuration is not actually compatible with xtimer. Sadly, no compatible clock frequency can be generated with the given core frequency
#define XTIMER_WIDTH   (16)
 
#define XTIMER_HZ   (230400LU)
 
#define XTIMER_BACKOFF   (80)
 
#define XTIMER_ISR_BACKOFF   (120)
 

ztimer configuration values

#define CONFIG_ZTIMER_USEC_TYPE   ZTIMER_TYPE_PERIPH_TIMER
 Use periph_timer for ZTIMER_USEC.
 
#define CONFIG_ZTIMER_USEC_DEV   (TIMER_DEV(0))
 Use TIMER_DEV(0) for ZTIMER_USEC.
 
#define CONFIG_ZTIMER_USEC_BASE_FREQ   (230400LU)
 Run timer for ZTIMER_USEC at 230,400 Hz.
 
#define CONFIG_ZTIMER_USEC_WIDTH   (16)
 TIMER_DEV(0) is 16 bit wide.
 

Onboard micro-sd slot pin definitions

#define SDCARD_SPI_PARAM_SPI   SPI_DEV(0)
 SPI device.
 
#define SDCARD_SPI_PARAM_CS   SD_SS
 Chip Select.
 
#define SDCARD_SPI_PARAM_CLK   SD_SCK
 Serial Clock.
 
#define SDCARD_SPI_PARAM_MOSI   SD_MOSI
 Master Output, Slave Input.
 
#define SDCARD_SPI_PARAM_MISO   SD_MISO
 Master Input, Slave Output.
 
#define SDCARD_SPI_PARAM_POWER   MEM_PW
 Powen on/off.
 
#define SDCARD_SPI_PARAM_POWER_AH   (true)
 Power on with power pin high.
 
#define CARD_DETECT_PIN   SD_PRESENT
 Pin for card detect.
 

Macro Definition Documentation

◆ CARD_DETECT_PIN

#define CARD_DETECT_PIN   SD_PRESENT

Pin for card detect.

Definition at line 194 of file board.h.

◆ CONFIG_ZTIMER_USEC_BASE_FREQ

#define CONFIG_ZTIMER_USEC_BASE_FREQ   (230400LU)

Run timer for ZTIMER_USEC at 230,400 Hz.

Definition at line 179 of file board.h.

◆ CONFIG_ZTIMER_USEC_DEV

#define CONFIG_ZTIMER_USEC_DEV   (TIMER_DEV(0))

Use TIMER_DEV(0) for ZTIMER_USEC.

Definition at line 178 of file board.h.

◆ CONFIG_ZTIMER_USEC_TYPE

#define CONFIG_ZTIMER_USEC_TYPE   ZTIMER_TYPE_PERIPH_TIMER

Use periph_timer for ZTIMER_USEC.

Definition at line 177 of file board.h.

◆ CONFIG_ZTIMER_USEC_WIDTH

#define CONFIG_ZTIMER_USEC_WIDTH   (16)

TIMER_DEV(0) is 16 bit wide.

Definition at line 180 of file board.h.

◆ CPU_ATMEGA_CLK_SCALE_INIT

#define CPU_ATMEGA_CLK_SCALE_INIT   CPU_ATMEGA_CLK_SCALE_DIV1

Definition at line 157 of file board.h.

◆ LED0_ENABLE_PORT

#define LED0_ENABLE_PORT   DDRD |= (1 << DDD6)

Definition at line 62 of file board.h.

◆ LED0_OFF

#define LED0_OFF   LED0_PORT &= ~LED0_PIN

Definition at line 64 of file board.h.

◆ LED0_ON

#define LED0_ON   LED0_PORT |= LED0_PIN

Definition at line 63 of file board.h.

◆ LED0_PIN

#define LED0_PIN   (1 << 6)

Definition at line 54 of file board.h.

◆ LED0_PORT

#define LED0_PORT   PORTD

Definition at line 52 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   LED0_PORT ^= LED0_PIN;

Definition at line 65 of file board.h.

◆ LED1_ENABLE_PORT

#define LED1_ENABLE_PORT   DDRC |= (1 << DDC1)

Definition at line 67 of file board.h.

◆ LED1_OFF

#define LED1_OFF   LED1_PORT &= ~LED1_PIN

Definition at line 69 of file board.h.

◆ LED1_ON

#define LED1_ON   LED1_PORT |= LED1_PIN

Definition at line 68 of file board.h.

◆ LED1_PIN

#define LED1_PIN   (1 << 1)

Definition at line 55 of file board.h.

◆ LED1_PORT

#define LED1_PORT   PORTC

Definition at line 53 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   LED1_PORT ^= LED1_PIN;

Definition at line 70 of file board.h.

◆ LED_GREEN_OFF

#define LED_GREEN_OFF   LED1_OFF

Definition at line 74 of file board.h.

◆ LED_GREEN_ON

#define LED_GREEN_ON   LED1_ON

Definition at line 73 of file board.h.

◆ LED_GREEN_TOGGLE

#define LED_GREEN_TOGGLE   LED1_TOGGLE

Definition at line 75 of file board.h.

◆ LED_PANIC

#define LED_PANIC   LED_RED_ON

Definition at line 85 of file board.h.

◆ LED_RED_OFF

#define LED_RED_OFF   LED0_OFF

Definition at line 77 of file board.h.

◆ LED_RED_ON

#define LED_RED_ON   LED0_ON

Definition at line 76 of file board.h.

◆ LED_RED_TOGGLE

#define LED_RED_TOGGLE   LED0_TOGGLE

Definition at line 78 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

Default MTD device.

Definition at line 199 of file board.h.

◆ MUX0_ENABLE_PORT

#define MUX0_ENABLE_PORT   DDRB |= (1 << DDB6)

Definition at line 105 of file board.h.

◆ MUX0_OFF

#define MUX0_OFF   MUX0_PORT &= ~MUX0_PIN

Definition at line 107 of file board.h.

◆ MUX0_ON

#define MUX0_ON   MUX0_PORT |= MUX0_PIN

Definition at line 106 of file board.h.

◆ MUX0_PIN

#define MUX0_PIN   (1 << 6)

Definition at line 97 of file board.h.

◆ MUX0_PORT

#define MUX0_PORT   PORTB

Definition at line 93 of file board.h.

◆ MUX1_ENABLE_PORT

#define MUX1_ENABLE_PORT   DDRB |= (1 << DDB7)

Definition at line 109 of file board.h.

◆ MUX1_OFF

#define MUX1_OFF   MUX1_PORT &= ~MUX1_PIN

Definition at line 111 of file board.h.

◆ MUX1_ON

#define MUX1_ON   MUX1_PORT |= MUX1_PIN

Definition at line 110 of file board.h.

◆ MUX1_PIN

#define MUX1_PIN   (1 << 7)

Definition at line 98 of file board.h.

◆ MUX1_PORT

#define MUX1_PORT   PORTB

Definition at line 94 of file board.h.

◆ MUX_PW_ENABLE_PORT

#define MUX_PW_ENABLE_PORT   DDRD |= (1 << DDD7);

Definition at line 101 of file board.h.

◆ MUX_PW_OFF

#define MUX_PW_OFF   MUX_PW_PORT &= ~MUX_PW_PIN

Definition at line 103 of file board.h.

◆ MUX_PW_ON

#define MUX_PW_ON   MUX_PW_PORT |= MUX_PW_PIN

Definition at line 102 of file board.h.

◆ MUX_PW_PIN

#define MUX_PW_PIN   (1 << 7)

Definition at line 96 of file board.h.

◆ MUX_PW_PORT

#define MUX_PW_PORT   PORTD

Definition at line 92 of file board.h.

◆ MUX_USB_XBEE_ENABLE_PORT

#define MUX_USB_XBEE_ENABLE_PORT   DDRD |= (1 << DDD5)

Definition at line 113 of file board.h.

◆ MUX_USB_XBEE_OFF

#define MUX_USB_XBEE_OFF   MUX_USB_XBEE_PORT &= ~MUX_USB_XBEE_PIN

Definition at line 115 of file board.h.

◆ MUX_USB_XBEE_ON

#define MUX_USB_XBEE_ON   MUX_USB_XBEE_PORT |= MUX_USB_XBEE_PIN

Definition at line 114 of file board.h.

◆ MUX_USB_XBEE_PIN

#define MUX_USB_XBEE_PIN   (1 << 5)

Definition at line 99 of file board.h.

◆ MUX_USB_XBEE_PORT

#define MUX_USB_XBEE_PORT   PORTD

Definition at line 95 of file board.h.

◆ SDCARD_SPI_PARAM_CLK

#define SDCARD_SPI_PARAM_CLK   SD_SCK

Serial Clock.

Definition at line 189 of file board.h.

◆ SDCARD_SPI_PARAM_CS

#define SDCARD_SPI_PARAM_CS   SD_SS

Chip Select.

Definition at line 188 of file board.h.

◆ SDCARD_SPI_PARAM_MISO

#define SDCARD_SPI_PARAM_MISO   SD_MISO

Master Input, Slave Output.

Definition at line 191 of file board.h.

◆ SDCARD_SPI_PARAM_MOSI

#define SDCARD_SPI_PARAM_MOSI   SD_MOSI

Master Output, Slave Input.

Definition at line 190 of file board.h.

◆ SDCARD_SPI_PARAM_POWER

#define SDCARD_SPI_PARAM_POWER   MEM_PW

Powen on/off.

Definition at line 192 of file board.h.

◆ SDCARD_SPI_PARAM_POWER_AH

#define SDCARD_SPI_PARAM_POWER_AH   (true)

Power on with power pin high.

Definition at line 193 of file board.h.

◆ SDCARD_SPI_PARAM_SPI

#define SDCARD_SPI_PARAM_SPI   SPI_DEV(0)

SPI device.

Definition at line 187 of file board.h.

◆ SET_MUX_AUX1_MODULE

#define SET_MUX_AUX1_MODULE
Value:
MUX_PW_ENABLE_PORT; MUX_PW_ON; \
MUX0_ENABLE_PORT; MUX1_ENABLE_PORT; \
MUX0_ON; MUX1_OFF

Definition at line 139 of file board.h.

◆ SET_MUX_AUX2_MODULE

#define SET_MUX_AUX2_MODULE
Value:
MUX_PW_ENABLE_PORT; MUX_PW_ON; \
MUX0_ENABLE_PORT; MUX1_ENABLE_PORT; \
MUX0_OFF; MUX1_OFF

Definition at line 142 of file board.h.

◆ SET_MUX_GPS

#define SET_MUX_GPS
Value:
MUX_PW_ENABLE_PORT; MUX_PW_ON; \
MUX0_ENABLE_PORT; MUX1_ENABLE_PORT; \
MUX0_OFF; MUX1_ON

Definition at line 133 of file board.h.

◆ SET_MUX_SOCKET0

#define SET_MUX_SOCKET0
Value:
MUX_PW_ENABLE_PORT; MUX_PW_ON; \
MUX_USB_XBEE_ENABLE_PORT; \
MUX_USB_XBEE_ON

Definition at line 148 of file board.h.

◆ SET_MUX_SOCKET1

#define SET_MUX_SOCKET1
Value:
MUX_PW_ENABLE_PORT; MUX_PW_ON; \
MUX0_ENABLE_PORT; MUX1_ENABLE_PORT; \
MUX0_ON; MUX1_ON

Definition at line 136 of file board.h.

◆ SET_MUX_USB_MODULE

#define SET_MUX_USB_MODULE
Value:
MUX_PW_ENABLE_PORT; MUX_PW_ON; \
MUX_USB_XBEE_ENABLE_PORT; \
MUX_USB_XBEE_OFF

Definition at line 145 of file board.h.

◆ STDIO_UART_BAUDRATE

#define STDIO_UART_BAUDRATE   (9600U)

As the CPU is too slow to handle 115200 baud, we set the default baudrate to 9600 for this board.

Definition at line 34 of file board.h.

◆ XTIMER_BACKOFF

#define XTIMER_BACKOFF   (80)

Definition at line 169 of file board.h.

◆ XTIMER_HZ

#define XTIMER_HZ   (230400LU)

Definition at line 168 of file board.h.

◆ XTIMER_ISR_BACKOFF

#define XTIMER_ISR_BACKOFF   (120)

Definition at line 170 of file board.h.

◆ XTIMER_WIDTH

#define XTIMER_WIDTH   (16)

Definition at line 167 of file board.h.