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

Board specific definitions for the standalone ATmega328p "board". More...

Detailed Description

Board specific definitions for the standalone ATmega328p "board".

Author
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de
Hinnerk van Bruinehsen h.v.b.nosp@m.ruin.nosp@m.ehsen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Laurent Navet laure.nosp@m.nt.n.nosp@m.avet@.nosp@m.gmai.nosp@m.l.com
Gerson Fernando Budke nando.nosp@m.jve@.nosp@m.gmail.nosp@m..com

Definition in file board.h.

#include "cpu.h"
#include "periph_conf.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

STDIO configuration

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

#define STDIO_UART_BAUDRATE   (9600U)
 

xtimer configuration values

#define XTIMER_WIDTH   (16)
 
#define XTIMER_HZ   (CLOCK_CORECLOCK / 8)
 
#define XTIMER_BACKOFF   (40)
 

Macros for controlling the on-board LED

#define LED0_PIN   GPIO_PIN(PORT_B, 5)
 
#define LED0_MODE   GPIO_OUT
 
#define LED0_ENABLE_PORT   DDRB |= LED0_PIN
 
#define LED0_ON   PORTB |= LED0_PIN
 
#define LED0_OFF   PORTB &= ~LED0_PIN
 
#define LED0_TOGGLE   PORTB ^= LED0_PIN
 

Button pin configuration

#define BTN0_PIN   GPIO_PIN(PORT_B, 7)
 
#define BTN0_MODE   GPIO_IN_PU
 
#define BTN0_INT_FLANK   GPIO_FALLING
 

Macro Definition Documentation

◆ BTN0_INT_FLANK

#define BTN0_INT_FLANK   GPIO_FALLING

Definition at line 76 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

Definition at line 75 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(PORT_B, 7)

Definition at line 74 of file board.h.

◆ LED0_ENABLE_PORT

#define LED0_ENABLE_PORT   DDRB |= LED0_PIN

Definition at line 64 of file board.h.

◆ LED0_MODE

#define LED0_MODE   GPIO_OUT

Definition at line 63 of file board.h.

◆ LED0_OFF

#define LED0_OFF   PORTB &= ~LED0_PIN

Definition at line 66 of file board.h.

◆ LED0_ON

#define LED0_ON   PORTB |= LED0_PIN

Definition at line 65 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(PORT_B, 5)

Definition at line 62 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   PORTB ^= LED0_PIN

Definition at line 67 of file board.h.

◆ STDIO_UART_BAUDRATE

#define STDIO_UART_BAUDRATE   (9600U)

Definition at line 42 of file board.h.

◆ XTIMER_BACKOFF

#define XTIMER_BACKOFF   (40)

Definition at line 55 of file board.h.

◆ XTIMER_HZ

#define XTIMER_HZ   (CLOCK_CORECLOCK / 8)

Definition at line 53 of file board.h.

◆ XTIMER_WIDTH

#define XTIMER_WIDTH   (16)

Definition at line 49 of file board.h.