Mistake on this page?
Report an issue in GitHub or email us
d52_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. 2016
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 D52STARTERKIT_H
54 #define D52STARTERKIT_H
55 
56 #include "nrf_gpio.h"
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 // LEDs definitions for D52DK1
63 #define LEDS_NUMBER 4
64 
65 // IO board active low leds
66 // D52DK1 does not define LED_START or LED_STOP since the LEDS are not on sequential pins
67 #define LED_A 24 //LED A on D52 Starter Kit IO Board
68 #define LED_B 31 //LED B on D52 Starter Kit IO Board
69 #define LED_C 17 //LED C on D52 Starter Kit IO Board
70 #define LED_D 20 //LED D on D52 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 BSP_LED_0 LED_A
77 #define BSP_LED_1 LED_B
78 #define BSP_LED_2 LED_C
79 #define BSP_LED_3 LED_D
80 
81 #define LEDS_INV_MASK LEDS_MASK
82 
83 #define BUTTONS_NUMBER 4
84 
85 // IO board pull-up buttons
86 #define BUTTON_A 6 //BUTTON A on D52 Starter Kit IO Board
87 #define BUTTON_B 7 //BUTTON B on D52 Starter Kit IO Board
88 #define BUTTON_C 16 //BUTTON C on D52 Starter Kit IO Board
89 #define BUTTON_D 19 //BUTTON D on D52 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 12 // Switch 1 on D52 Starter Kit Battery Board
103 #define SWITCH_2 8 // Switch 2 on D52 Starter Kit Battery Board
104 #define SWITCH_3 15 // Switch 3 on D52 Starter Kit Battery Board
105 #define SWITCH_4 11 // Switch 4 on D52 Starter Kit Battery Board
106 #define SWITCH_5 14 // Switch 5 on D52 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 BSP_SWITCH_0_MASK (1<<BSP_SWITCH_0)
118 #define BSP_SWITCH_1_MASK (1<<BSP_SWITCH_1)
119 #define BSP_SWITCH_2_MASK (1<<BSP_SWITCH_2)
120 #define BSP_SWITCH_3_MASK (1<<BSP_SWITCH_3)
121 #define BSP_SWITCH_4_MASK (1<<BSP_SWITCH_4)
122 
123 #define SWITCHES_MASK (BSP_SWITCH_0_MASK | BSP_SWITCH_1_MASK | BSP_SWITCH_2_MASK | BSP_SWITCH_3_MASK | BSP_SWITCH_4_MASK)
124 
125 // D52DK1 does not have UART peripheral. Dummy defines for compilation.
126 #define RX_PIN_NUMBER UART_PIN_DISCONNECTED
127 #define TX_PIN_NUMBER UART_PIN_DISCONNECTED
128 #define CTS_PIN_NUMBER UART_PIN_DISCONNECTED
129 #define RTS_PIN_NUMBER UART_PIN_DISCONNECTED
130 
131 // serialization CONNECTIVITY board
132 #define SER_CON_RX_PIN 22 // UART RX pin number.
133 #define SER_CON_TX_PIN 23 // UART TX pin number.
134 #define SER_CON_CTS_PIN 25 // UART Clear To Send pin number. Not used if HWFC is set to false.
135 #define SER_CON_RTS_PIN 2 // UART Request To Send pin number. Not used if HWFC is set to false.
136 
137 // serialization APPLICATION board - temp. setup for running serialized MEMU tests
138 #define SER_APP_RX_PIN 23 // UART RX pin number.
139 #define SER_APP_TX_PIN 22 // UART TX pin number.
140 #define SER_APP_CTS_PIN 2 // UART Clear To Send pin number.
141 #define SER_APP_RTS_PIN 25 // UART Request To Send pin number.
142 
143 
144 #define SER_CONN_CHIP_RESET_PIN 11 // Pin used to reset connectivity chip
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 #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.