nz32-sc151/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Fundacion Inria Chile
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
21 #ifndef BOARD_H
22 #define BOARD_H
23 
24 #include <stdint.h>
25 
26 #include "cpu.h"
27 #include "periph_conf.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 #define LED0_PIN GPIO_PIN(PORT_B, 2)
38 
39 #define LED0_MASK (1 << 2)
40 
41 #define LED0_ON (GPIOB->BSRR = LED0_MASK)
42 #define LED0_OFF (GPIOB->BSRR = (LED0_MASK << 16))
43 #define LED0_TOGGLE (GPIOB->ODR ^= LED0_MASK)
44 
49 void board_init(void);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif /* BOARD_H */
56 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.
Peripheral MCU configuration for the limifrog-v1 board.