pic32-clicker/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright(C) 2016,2017, Imagination Technologies Limited and/or its
3  * affiliated group companies.
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  *
9  */
10 
28 #ifndef BOARD_H
29 #define BOARD_H
30 
31 #include "periph_conf.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 #include "vendor/p32mx470f512h.h"
38 
43 #define TICKS_PER_US (48)
44 
48 #define EIC_IRQ (1)
49 
54 #define LED1_PIN GPIO_PIN(PORT_B, 1)
55 #define LED2_PIN GPIO_PIN(PORT_B, 2)
56 
57 #define LED1_MASK (1 << 1)
58 #define LED2_MASK (1 << 2)
59 
60 #define LED1_ON (LATBSET = LED1_MASK)
61 #define LED1_OFF (LATBCLR = LED1_MASK)
62 #define LED1_TOGGLE (LATBINV = LED1_MASK)
63 
64 #define LED2_ON (LATBSET = LED2_MASK)
65 #define LED2_OFF (LATBCLR = LED2_MASK)
66 #define LED2_TOGGLE (LATBINV = LED2_MASK)
67 
72 void board_init(void);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 
79 #endif /* BOARD_H */
80 
void board_init(void)
Board level initialization.
peripheral configuration for the MikroE PIC32 Clicker