Wirepas SDK
board.h
Go to the documentation of this file.
1/* Copyright 2019 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
13#ifndef BOARD_PROMISTEL_RPI_HAT_BOARD_H_
14#define BOARD_PROMISTEL_RPI_HAT_BOARD_H_
15
16// Serial port pins
17#define BOARD_USART_TX_PIN 45 /* P1.13 */
18#define BOARD_USART_RX_PIN 29
19#define BOARD_USART_CTS_PIN 7 /* For USE_USART_HW_FLOW_CONTROL */
20#define BOARD_USART_RTS_PIN 5 /* For USE_USART_HW_FLOW_CONTROL */
21
22// List of GPIO pins
23#define BOARD_GPIO_PIN_LIST {15, /* P0.15 */\
24 16, /* P0.16 */\
25 24, /* P0.24 */\
26 14, /* P0.14 */\
27 29, /* P0.29. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
28 23} /* P0.23. required by the dual_mcu app (indication signal) */
29
30// User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
31#define BOARD_GPIO_ID_LED_R 0 // mapped to pin P0.15
32#define BOARD_GPIO_ID_LED_G 1 // mapped to pin P0.16
33#define BOARD_GPIO_ID_LED_B 2 // mapped to pin P0.24
34#define BOARD_GPIO_ID_BUTTON0 3 // mapped to pin P0.14
35#define BOARD_GPIO_ID_USART_WAKEUP 4 // mapped to pin P0.29
36#define BOARD_GPIO_ID_UART_IRQ 5 // mapped to pin P0.23
37
38// List of LED IDs
39#define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED_R, BOARD_GPIO_ID_LED_G, BOARD_GPIO_ID_LED_B}
40
41// Active low polarity for LEDs
42#define BOARD_LED_ACTIVE_LOW true
43
44// List of button IDs
45#define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON0}
46
47// Active low polarity for buttons
48#define BOARD_BUTTON_ACTIVE_LOW true
49
50// Active internal pull-up for buttons
51#define BOARD_BUTTON_INTERNAL_PULL true
52
53// Define the SPI instance to use
54#define USE_SPI0
55
56// SPI Port pins
57#define BOARD_SPI_SCK_PIN 19
58#define BOARD_SPI_MOSI_PIN 20
59#define BOARD_SPI_MISO_PIN 21
60
61// SPI Chip Select pin
62#define BOARD_SPI_CS_PIN 17
63
64// The board supports DCDC (#define BOARD_SUPPORT_DCDC)
65// Since SDK v1.2 (bootloader > v7) this option has been move to
66// board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
67#ifdef BOARD_SUPPORT_DCDC
68#error This option has been moved to board/<board_name>/config.mk
69#endif
70
71#endif /* BOARD_PROMISTEL_RPI_HAT_BOARD_H_ */