Wirepas SDK
board.h
Go to the documentation of this file.
1 /* Copyright 2018 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
13 #ifndef BOARD_TBSENSE2_BOARD_H_
14 #define BOARD_TBSENSE2_BOARD_H_
15 
16 // Waps usart defines
17 #if defined USE_FTDI
18 #define BOARD_USART_ID 1
19 #define BOARD_USART_GPIO_PORT GPIOF
20 #define BOARD_USART_TX_PIN 3
21 #define BOARD_USART_RX_PIN 4
22 // ROUTELOC are dependent on GPIO defined above and mapping
23 // can be founded chip datasheet from Silabs
24 #define BOARD_USART_ROUTELOC_RXLOC USART_ROUTELOC0_RXLOC_LOC27
25 #define BOARD_USART_ROUTELOC_TXLOC USART_ROUTELOC0_TXLOC_LOC27
26 
27 #else
28 #define BOARD_USART_ID 0
29 #define BOARD_USART_GPIO_PORT GPIOA
30 #define BOARD_USART_TX_PIN 0
31 #define BOARD_USART_RX_PIN 1
32 
33 // VCOM port only supports 115200 baudrate
34 // This speed will be used independently of UART_BAUDRATE flag value
35 #define BOARD_USART_FORCE_BAUDRATE 115200
36 
37 // ROUTELOC are dependent on GPIO defined above and mapping
38 // can be founded chip datasheet from Silabs
39 #define BOARD_USART_ROUTELOC_RXLOC USART_ROUTELOC0_RXLOC_LOC0
40 #define BOARD_USART_ROUTELOC_TXLOC USART_ROUTELOC0_TXLOC_LOC0
41 #endif
42 
43 // Interrupt pin for dual mcu app, unread indication
44 #define BOARD_UART_INT_PIN 6
45 #define BOARD_UART_INT_PORT GPIOF
46 
47 // List of GPIO ports and pins for the LEDs on the board: red LED, green LED
48 #define BOARD_LED_PIN_LIST {{GPIOD, 8}, {GPIOD, 9}}
49 
50 // Active high polarity for LEDs
51 #define BOARD_LED_ACTIVE_LOW false
52 
53 // List of ext. ints, GPIO ports and pins for buttons on the board: BTN0, BTN1
54 #define BOARD_BUTTON_PIN_LIST {{12, GPIOD, 14}, {14, GPIOD, 15}}
55 
56 // Active low polarity for buttons
57 #define BOARD_BUTTON_ACTIVE_LOW true
58 
59 // Board has external pull-up for buttons
60 #define BOARD_BUTTON_INTERNAL_PULL false
61 
62 // Buttons use even external interrupts
63 #define BOARD_BUTTON_USE_EVEN_INT true
64 
65 
66 #endif /* BOARD_TBSENSE2_BOARD_H_ */