pic32-wifire/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright(C) 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/p32mz2048efg100.h"
38 
43 #define TICKS_PER_US (100)
44 
48 #define EIC_IRQ (1)
49 
54 #define LED1_PIN GPIO_PIN(PORT_G, 6)
55 #define LED2_PIN GPIO_PIN(PORT_D, 4)
56 #define LED3_PIN GPIO_PIN(PORT_B, 11)
57 #define LED4_PIN GPIO_PIN(PORT_G, 15)
58 
59 #define LED1_MASK (1 << 6)
60 #define LED2_MASK (1 << 4)
61 #define LED3_MASK (1 << 11)
62 #define LED4_MASK (1 << 15)
63 
64 #define LED1_ON (LATGSET = LED1_MASK)
65 #define LED1_OFF (LATGCLR = LED1_MASK)
66 #define LED1_TOGGLE (LATGINV = LED1_MASK)
67 
68 #define LED2_ON (LATDSET = LED2_MASK)
69 #define LED2_OFF (LATDCLR = LED2_MASK)
70 #define LED2_TOGGLE (LATDINV = LED2_MASK)
71 
72 #define LED3_ON (LATBSET = LED3_MASK)
73 #define LED3_OFF (LATBCLR = LED3_MASK)
74 #define LED3_TOGGLE (LATBINV = LED3_MASK)
75 
76 #define LED4_ON (LATGSET = LED4_MASK)
77 #define LED4_OFF (LATGCLR = LED4_MASK)
78 #define LED4_TOGGLE (LATGINV = LED4_MASK)
79 
84 void board_init(void);
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* BOARD_H */
91 
void board_init(void)
Board level initialisation.
peripheral configuration for the Digilent PIC32 WiFire