-
Notifications
You must be signed in to change notification settings - Fork 0
/
hal-config-app-common.h
118 lines (89 loc) · 4.11 KB
/
hal-config-app-common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/***************************************************************************//**
* @file
* @brief hal-config-app-common.h
*******************************************************************************
* # License
* <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
#ifndef HAL_CONFIG_APP_COMMON_H
#define HAL_CONFIG_APP_COMMON_H
#include "em_device.h"
#include "hal-config-types.h"
#if defined(FEATURE_IOEXPANDER)
#include "hal-config-ioexp.h"
#endif
#define HAL_PA_RAMP (10)
#define HAL_PA_2P4_LOWPOWER (0)
#define HAL_PA_POWER (252)
#define HAL_PA_CURVE_HEADER "pa_curves_efr32.h"
//#warning "Make sure BSP_PA_VOLTAGE corresponds to the actual board design!"
#ifdef FEATURE_PA_INPUT_FROM_VBAT
// PAVDD is fed from battery voltage
#define BSP_PA_VOLTAGE (3300)
#else // FEATURE_PA_HIGH_POWER
// PAVDD is fed from a DC-DC converter
#define BSP_PA_VOLTAGE (1800)
#endif // FEATURE_PA_HIGH_POWER
#define HAL_VCOM_ENABLE (0)
#define HAL_I2CSENSOR_ENABLE (0)
#define HAL_SPIDISPLAY_ENABLE (0)
#define HAL_PA_VOLTAGE BSP_PA_VOLTAGE
// Select antenna path on EFR32xG2x devices:
// - RF2G2_IO1: 0
// - RF2G2_IO2: 1
#define APP_RF_ANTENNA 1
#define APP_RF_CONFIG_ANTENNA 0
#define GECKO_RF_ANTENNA APP_RF_ANTENNA
#if defined(FEATURE_EXP_HEADER_USART3)
#define BSP_EXP_USART USART3
#define BSP_EXP_USART_CTS_PIN BSP_USART3_CTS_PIN
#define BSP_EXP_USART_CTS_PORT BSP_USART3_CTS_PORT
#define BSP_EXP_USART_CTS_LOC BSP_USART3_CTS_LOC
#define BSP_EXP_USART_RTS_PIN BSP_USART3_RTS_PIN
#define BSP_EXP_USART_RTS_PORT BSP_USART3_RTS_PORT
#define BSP_EXP_USART_RTS_LOC BSP_USART3_RTS_LOC
#define BSP_EXP_USART_RX_PIN BSP_USART3_RX_PIN
#define BSP_EXP_USART_RX_PORT BSP_USART3_RX_PORT
#define BSP_EXP_USART_RX_LOC BSP_USART3_RX_LOC
#define BSP_EXP_USART_TX_PIN BSP_USART3_TX_PIN
#define BSP_EXP_USART_TX_PORT BSP_USART3_TX_PORT
#define BSP_EXP_USART_TX_LOC BSP_USART3_TX_LOC
#elif defined(FEATURE_EXP_HEADER_USART1)
#define BSP_EXP_USART USART1
#define BSP_EXP_USART_CTS_PIN BSP_USART1_CTS_PIN
#define BSP_EXP_USART_CTS_PORT BSP_USART1_CTS_PORT
#define BSP_EXP_USART_CTS_LOC BSP_USART1_CTS_LOC
#define BSP_EXP_USART_RTS_PIN BSP_USART1_RTS_PIN
#define BSP_EXP_USART_RTS_PORT BSP_USART1_RTS_PORT
#define BSP_EXP_USART_RTS_LOC BSP_USART1_RTS_LOC
#define BSP_EXP_USART_RX_PIN BSP_USART1_RX_PIN
#define BSP_EXP_USART_RX_PORT BSP_USART1_RX_PORT
#define BSP_EXP_USART_RX_LOC BSP_USART1_RX_LOC
#define BSP_EXP_USART_TX_PIN BSP_USART1_TX_PIN
#define BSP_EXP_USART_TX_PORT BSP_USART1_TX_PORT
#define BSP_EXP_USART_TX_LOC BSP_USART1_TX_LOC
#else
#define BSP_EXP_USART USART0
#define BSP_EXP_USART_CTS_PIN BSP_USART0_CTS_PIN
#define BSP_EXP_USART_CTS_PORT BSP_USART0_CTS_PORT
#define BSP_EXP_USART_CTS_LOC BSP_USART0_CTS_LOC
#define BSP_EXP_USART_RTS_PIN BSP_USART0_RTS_PIN
#define BSP_EXP_USART_RTS_PORT BSP_USART0_RTS_PORT
#define BSP_EXP_USART_RTS_LOC BSP_USART0_RTS_LOC
#define BSP_EXP_USART_RX_PIN BSP_USART0_RX_PIN
#define BSP_EXP_USART_RX_PORT BSP_USART0_RX_PORT
#define BSP_EXP_USART_RX_LOC BSP_USART0_RX_LOC
#define BSP_EXP_USART_TX_PIN BSP_USART0_TX_PIN
#define BSP_EXP_USART_TX_PORT BSP_USART0_TX_PORT
#define BSP_EXP_USART_TX_LOC BSP_USART0_TX_LOC
#endif // FEATURE_EXP_HEADER_USART3
#endif /* HAL_CONFIG_APP_COMMON_H */