frdm-k64f/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universit├Ąt Berlin
3  * Copyright (C) 2015 PHYTEC Messtechnik GmbH
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
22 #ifndef BOARD_H
23 #define BOARD_H
24 
25 #include "cpu.h"
26 #include "periph_conf.h"
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
37 #define LED0_PIN GPIO_PIN(PORT_B, 22)
38 #define LED1_PIN GPIO_PIN(PORT_E, 26)
39 #define LED2_PIN GPIO_PIN(PORT_B, 21)
40 
41 #define LED0_MASK (1 << 22)
42 #define LED1_MASK (1 << 26)
43 #define LED2_MASK (1 << 21)
44 
45 #define LED0_ON (GPIOB->PCOR = LED0_MASK)
46 #define LED0_OFF (GPIOB->PSOR = LED0_MASK)
47 #define LED0_TOGGLE (GPIOB->PTOR = LED0_MASK)
48 
49 #define LED1_ON (GPIOE->PCOR = LED1_MASK)
50 #define LED1_OFF (GPIOE->PSOR = LED1_MASK)
51 #define LED1_TOGGLE (GPIOE->PTOR = LED1_MASK)
52 
53 #define LED2_ON (GPIOB->PCOR = LED2_MASK)
54 #define LED2_OFF (GPIOB->PSOR = LED2_MASK)
55 #define LED2_TOGGLE (GPIOB->PTOR = LED2_MASK)
56 
61 void board_init(void);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* BOARD_H */
68 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.