Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
3 * SPDX-FileCopyrightText: 2016 Laurent Navet <laurent.navet@gmail.com>
4 * SPDX-FileCopyrightText: 2019 Otto-von-Guericke-Universität Magdeburg
5 * SPDX-FileCopyrightText: 2021-2023 Gerson Fernando Budke
6 * SPDX-License-Identifier: LGPL-2.1-only
7 */
8
9#pragma once
10
23
24#include "cpu.h"
25#include "periph_conf.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
38#define STDIO_UART_BAUDRATE (9600U)
40
45#define XTIMER_WIDTH (16)
46#if CLOCK_CORECLOCK > 4000000UL
47#define XTIMER_HZ (CLOCK_CORECLOCK / 64)
48#else
49#define XTIMER_HZ (CLOCK_CORECLOCK / 8)
50#endif
51#define XTIMER_BACKOFF (40)
53
58#define LED0_PIN GPIO_PIN(PORT_B, 5)
59#define LED0_MODE GPIO_OUT
60#define LED0_ENABLE_PORT DDRB |= LED0_PIN
61#define LED0_ON PORTB |= LED0_PIN
62#define LED0_OFF PORTB &= ~LED0_PIN
63#define LED0_TOGGLE PORTB ^= LED0_PIN
65
70#define BTN0_PIN GPIO_PIN(PORT_B, 7)
71#define BTN0_MODE GPIO_IN_PU
72#define BTN0_INT_FLANK GPIO_FALLING
74
75#ifdef __cplusplus
76}
77#endif
78
Peripheral MCU configuration for the ATmega328p xplained mini "board".