Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
26
#ifndef BOARD_H
27
#define BOARD_H
28
29
#include "
periph_conf.h
"
30
31
#ifdef __cplusplus
32
extern
"C"
{
33
#endif
34
39
#define TICKS_PER_US (100)
40
45
#define LED1_PIN GPIO_PIN(PORT_G, 6)
46
#define LED2_PIN GPIO_PIN(PORT_D, 4)
47
#define LED3_PIN GPIO_PIN(PORT_B, 11)
48
#define LED4_PIN GPIO_PIN(PORT_G, 15)
49
50
#define LED1_MASK (1 << 6)
51
#define LED2_MASK (1 << 4)
52
#define LED3_MASK (1 << 11)
53
#define LED4_MASK (1 << 15)
54
55
#define LED1_ON (LATGSET = LED1_MASK)
56
#define LED1_OFF (LATGCLR = LED1_MASK)
57
#define LED1_TOGGLE (LATGINV = LED1_MASK)
58
59
#define LED2_ON (LATDSET = LED2_MASK)
60
#define LED2_OFF (LATDCLR = LED2_MASK)
61
#define LED2_TOGGLE (LATDINV = LED2_MASK)
62
63
#define LED3_ON (LATBSET = LED3_MASK)
64
#define LED3_OFF (LATBCLR = LED3_MASK)
65
#define LED3_TOGGLE (LATBINV = LED3_MASK)
66
67
#define LED4_ON (LATGSET = LED4_MASK)
68
#define LED4_OFF (LATGCLR = LED4_MASK)
69
#define LED4_TOGGLE (LATGINV = LED4_MASK)
70
76
#define BTN0_PIN GPIO_PIN(PORT_A, 5)
77
#define BTN0_MODE GPIO_IN
78
79
#define BTN1_PIN GPIO_PIN(PORT_A, 4)
80
#define BTN1_MODE GPIO_IN
81
86
void
board_init
(
void
);
87
88
#ifdef __cplusplus
89
}
90
#endif
91
92
#endif
/* BOARD_H */
93
periph_conf.h
peripheral configuration for the Digilent PIC32 WiFire
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17