3 * Copyright (c) 2020 Project CHIP Authors
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 /******************************************************************************
20 * @brief hal-config-app-common.h
21 *******************************************************************************
23 * <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
24 *******************************************************************************
26 * The licensor of this software is Silicon Laboratories Inc. Your use of this
27 * software is governed by the terms of Silicon Labs Master Software License
28 * Agreement (MSLA) available at
29 * www.silabs.com/about-us/legal/master-software-license-agreement. This
30 * software is distributed to you in Source Code format and is governed by the
31 * sections of the MSLA applicable to Source Code.
33 ******************************************************************************/
37 #include "em_device.h"
38 #include "hal-config-types.h"
40 #if defined(FEATURE_IOEXPANDER)
41 #include "hal-config-ioexp.h"
44 #define HAL_EXTFLASH_FREQUENCY (1000000)
46 #define HAL_PTI_ENABLE (1)
47 #define HAL_PTI_MODE (HAL_PTI_MODE_UART)
48 #define HAL_PTI_BAUD_RATE (1600000)
50 #define HAL_PA_RAMP (10)
51 #define HAL_PA_2P4_LOWPOWER (0)
52 #define HAL_PA_POWER (252)
53 #define HAL_PA_CURVE_HEADER "pa_curves_efr32.h"
55 #define HAL_PA_VOLTAGE BSP_PA_VOLTAGE
57 // Select antenna path on EFR32xG2x devices:
60 #define GECKO_RF_ANTENNA 1
61 #if defined(FEATURE_EXP_HEADER_USART3)
63 #define BSP_EXP_USART USART3
65 #define BSP_EXP_USART_CTS_PIN BSP_USART3_CTS_PIN
66 #define BSP_EXP_USART_CTS_PORT BSP_USART3_CTS_PORT
67 #define BSP_EXP_USART_CTS_LOC BSP_USART3_CTS_LOC
69 #define BSP_EXP_USART_RTS_PIN BSP_USART3_RTS_PIN
70 #define BSP_EXP_USART_RTS_PORT BSP_USART3_RTS_PORT
71 #define BSP_EXP_USART_RTS_LOC BSP_USART3_RTS_LOC
73 #define BSP_EXP_USART_RX_PIN BSP_USART3_RX_PIN
74 #define BSP_EXP_USART_RX_PORT BSP_USART3_RX_PORT
75 #define BSP_EXP_USART_RX_LOC BSP_USART3_RX_LOC
77 #define BSP_EXP_USART_TX_PIN BSP_USART3_TX_PIN
78 #define BSP_EXP_USART_TX_PORT BSP_USART3_TX_PORT
79 #define BSP_EXP_USART_TX_LOC BSP_USART3_TX_LOC
81 #elif defined(FEATURE_EXP_HEADER_USART1)
83 #define BSP_EXP_USART USART1
85 #define BSP_EXP_USART_CTS_PIN BSP_USART1_CTS_PIN
86 #define BSP_EXP_USART_CTS_PORT BSP_USART1_CTS_PORT
87 #define BSP_EXP_USART_CTS_LOC BSP_USART1_CTS_LOC
89 #define BSP_EXP_USART_RTS_PIN BSP_USART1_RTS_PIN
90 #define BSP_EXP_USART_RTS_PORT BSP_USART1_RTS_PORT
91 #define BSP_EXP_USART_RTS_LOC BSP_USART1_RTS_LOC
93 #define BSP_EXP_USART_RX_PIN BSP_USART1_RX_PIN
94 #define BSP_EXP_USART_RX_PORT BSP_USART1_RX_PORT
95 #define BSP_EXP_USART_RX_LOC BSP_USART1_RX_LOC
97 #define BSP_EXP_USART_TX_PIN BSP_USART1_TX_PIN
98 #define BSP_EXP_USART_TX_PORT BSP_USART1_TX_PORT
99 #define BSP_EXP_USART_TX_LOC BSP_USART1_TX_LOC
103 #define BSP_EXP_USART USART0
105 #define BSP_EXP_USART_CTS_PIN BSP_USART0_CTS_PIN
106 #define BSP_EXP_USART_CTS_PORT BSP_USART0_CTS_PORT
107 #define BSP_EXP_USART_CTS_LOC BSP_USART0_CTS_LOC
109 #define BSP_EXP_USART_RTS_PIN BSP_USART0_RTS_PIN
110 #define BSP_EXP_USART_RTS_PORT BSP_USART0_RTS_PORT
111 #define BSP_EXP_USART_RTS_LOC BSP_USART0_RTS_LOC
113 #define BSP_EXP_USART_RX_PIN BSP_USART0_RX_PIN
114 #define BSP_EXP_USART_RX_PORT BSP_USART0_RX_PORT
115 #define BSP_EXP_USART_RX_LOC BSP_USART0_RX_LOC
117 #define BSP_EXP_USART_TX_PIN BSP_USART0_TX_PIN
118 #define BSP_EXP_USART_TX_PORT BSP_USART0_TX_PORT
119 #define BSP_EXP_USART_TX_LOC BSP_USART0_TX_LOC
121 #endif // FEATURE_EXP_HEADER_USART3