ek-lm4f120xl/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Rakendra Thapa <rakendrathapa@gmail.com>
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 "cpu.h"
25 #include "periph/uart.h"
26 #include "periph/timer.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #define LED0_PIN GPIO_PIN(5, 7)
37 #define LED1_PIN GPIO_PIN(5, 2)
38 #define LED2_PIN GPIO_PIN(5, 1)
39 
40 #define LED_PORT (GPIO_PORTF_DATA_R)
41 #define LED0_MASK (1 << 7)
42 #define LED1_MASK (1 << 2)
43 #define LED2_MASK (1 << 1)
44 
45 #define LED0_ON (LED_PORT |= LED0_MASK)
46 #define LED0_OFF (LED_PORT &= ~LED0_MASK)
47 #define LED0_TOGGLE (LED_PORT ^= LED0_MASK)
48 
49 #define LED1_ON (LED_PORT |= LED1_MASK)
50 #define LED1_OFF (LED_PORT &= ~LED1_MASK)
51 #define LED1_TOGGLE (LED_PORT ^= LED1_MASK)
52 
53 #define LED2_ON (LED_PORT |= LED2_MASK)
54 #define LED2_OFF (LED_PORT &= ~LED2_MASK)
55 #define LED2_TOGGLE (LED_PORT ^= LED2_MASK)
56 /* @} */
57 
61 extern void board_init(void);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif
Low-level UART peripheral driver interface definition.
Low-level timer peripheral driver interface definitions.
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.