Mistake on this page?
Report an issue in GitHub or email us
n5_starterkit.h
1 /**
2  * This software is subject to the ANT+ Shared Source License
3  * www.thisisant.com/swlicenses
4  * Copyright (c) Garmin Canada Inc. 2015
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or
8  * without modification, are permitted provided that the following
9  * conditions are met:
10  *
11  * 1) Redistributions of source code must retain the above
12  * copyright notice, this list of conditions and the following
13  * disclaimer.
14  *
15  * 2) Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials
18  * provided with the distribution.
19  *
20  * 3) Neither the name of Garmin nor the names of its
21  * contributors may be used to endorse or promote products
22  * derived from this software without specific prior
23  * written permission.
24  *
25  * The following actions are prohibited:
26  *
27  * 1) Redistribution of source code containing the ANT+ Network
28  * Key. The ANT+ Network Key is available to ANT+ Adopters.
29  * Please refer to http://thisisant.com to become an ANT+
30  * Adopter and access the key.
31  *
32  * 2) Reverse engineering, decompilation, and/or disassembly of
33  * software provided in binary form under this license.
34  *
35  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
36  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
37  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
38  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY
39  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
40  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING,
42  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43  * SERVICES; DAMAGE TO ANY DEVICE, LOSS OF USE, DATA, OR
44  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
45  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
46  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
47  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
48  * OF THE POSSIBILITY OF SUCH DAMAGE. SOME STATES DO NOT ALLOW
49  * THE EXCLUSION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE
50  * ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
51  *
52  */
53 #ifndef N5STARTERKIT_H
54 #define N5STARTERKIT_H
55 
56 #include "nrf_gpio.h"
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 // LEDs definitions for N5DK1
63 #define LEDS_NUMBER 4
64 
65 // IO board active low leds
66 // N5DK1 does not define LED_START or LED_STOP since the LEDS are not on sequential pins
67 #define LED_A 8 //LED A on N5 Starter Kit IO Board
68 #define LED_B 3 //LED B on N5 Starter Kit IO Board
69 #define LED_C 15 //LED C on N5 Starter Kit IO Board
70 #define LED_D 30 //LED D on N5 Starter Kit IO Board
71 
72 #define LEDS_ACTIVE_STATE 0
73 
74 #define LEDS_LIST { LED_A, LED_B, LED_C, LED_D }
75 
76 #define LEDS_INV_MASK LEDS_MASK
77 
78 #define BSP_LED_0 LED_A
79 #define BSP_LED_1 LED_B
80 #define BSP_LED_2 LED_C
81 #define BSP_LED_3 LED_D
82 
83 #define BUTTONS_NUMBER 4
84 
85 // IO board pull-up buttons
86 #define BUTTON_A 23 //BUTTON A on N5 Starter Kit IO Board
87 #define BUTTON_B 2 //BUTTON B on N5 Starter Kit IO Board
88 #define BUTTON_C 12 //BUTTON C on N5 Starter Kit IO Board
89 #define BUTTON_D 11 //BUTTON D on N5 Starter Kit IO Board
90 #define BUTTON_PULL NRF_GPIO_PIN_PULLUP
91 
92 #define BUTTONS_ACTIVE_STATE 0
93 
94 #define BSP_BUTTON_0 BUTTON_A
95 #define BSP_BUTTON_1 BUTTON_B
96 #define BSP_BUTTON_2 BUTTON_C
97 #define BSP_BUTTON_3 BUTTON_D
98 
99 #define BUTTONS_LIST { BUTTON_A, BUTTON_B, BUTTON_C, BUTTON_D }
100 
101 // Battery board pull-up switches
102 #define SWITCH_1 5 // Switch 1 on N5 Starter Kit Battery Board
103 #define SWITCH_2 0 // Switch 2 on N5 Starter Kit Battery Board
104 #define SWITCH_3 6 // Switch 3 on N5 Starter Kit Battery Board
105 #define SWITCH_4 24 // Switch 4 on N5 Starter Kit Battery Board
106 #define SWITCH_5 9 // Switch 5 on N5 Starter Kit Battery Board
107 #define SWITCH_PULL NRF_GPIO_PIN_PULLUP
108 
109 #define SWITCHES_NUMBER 5
110 
111 #define BSP_SWITCH_0 SWITCH_1
112 #define BSP_SWITCH_1 SWITCH_2
113 #define BSP_SWITCH_2 SWITCH_3
114 #define BSP_SWITCH_3 SWITCH_4
115 #define BSP_SWITCH_4 SWITCH_5
116 
117 #define SWITCHES_MASK 0x01000261
118 
119 // N5DK1 does not have UART peripheral. Dummy defines for compilation.
120 #define RX_PIN_NUMBER UART_PIN_DISCONNECTED
121 #define TX_PIN_NUMBER UART_PIN_DISCONNECTED
122 #define CTS_PIN_NUMBER UART_PIN_DISCONNECTED
123 #define RTS_PIN_NUMBER UART_PIN_DISCONNECTED
124 
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 #endif
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.