board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2020 ML!PA Consulting GmbH
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "cpu.h"
20 #include "periph_conf.h"
21 #include "periph_cpu.h"
22 #include "periph/gpio.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
33 #ifndef STDIO_UART_BAUDRATE
34 #define STDIO_UART_BAUDRATE (57600)
35 #endif
42 #define LED0_PIN GPIO_PIN(PA, 9)
43 
44 #define LED_PORT PORT->Group[PA]
45 #define LED0_MASK (1 << 9)
46 
47 #define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK)
48 #define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK)
49 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
56 #define BTN0_PIN GPIO_PIN(PA, 25)
57 #define BTN0_MODE GPIO_IN_PU
60 #ifdef __cplusplus
61 }
62 #endif
63 
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.