board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Franz Freitag, Justus Krebs, Nick Weiler
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
24 #include "cpu.h"
25 #include "periph_conf.h"
26 #include "periph/gpio.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #define LED_PORT PORT->Group[PA]
37 
38 #define LED0_PIN GPIO_PIN(PA, 18)
39 #define LED0_MASK (1 << 18)
40 #define LED0_NAME "LED(BLUE_RX)"
41 
42 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
43 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
44 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
45 
46 #define LED1_PIN GPIO_PIN(PA, 19)
47 #define LED1_MASK (1 << 19)
48 #define LED1_NAME "LED(BLUE_TX)"
49 
50 #define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
51 #define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
52 #define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
53 
54 #define LED2_PIN GPIO_PIN(PA, 17)
55 #define LED2_MASK (1 << 17)
56 #define LED2_NAME "LED(YELLOW_USER)"
57 
58 #define LED2_OFF (LED_PORT.OUTSET.reg = LED2_MASK)
59 #define LED2_ON (LED_PORT.OUTCLR.reg = LED2_MASK)
60 #define LED2_TOGGLE (LED_PORT.OUTTGL.reg = LED2_MASK)
67 #define INTERNAL_PERIPHERAL_VID (0x239A)
68 #define INTERNAL_PERIPHERAL_PID (0x0057)
71 #ifdef __cplusplus
72 }
73 #endif
74 
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.