1 /****************************************************************************** 2 * Copyright (c) 2022 Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") 3 * All rights reserved. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 *****************************************************************************/ 18 19 #ifndef BLT_PA_H_ 20 #define BLT_PA_H_ 21 22 #include "../gpio.h" 23 24 25 #ifndef PA_ENABLE 26 #define PA_ENABLE 0 27 #endif 28 29 30 31 #ifndef PA_TXEN_PIN 32 #define PA_TXEN_PIN GPIO_PB2 33 #endif 34 35 #ifndef PA_RXEN_PIN 36 #define PA_RXEN_PIN GPIO_PB3 37 #endif 38 39 40 41 #define PA_TYPE_OFF 0 42 #define PA_TYPE_TX_ON 1 43 #define PA_TYPE_RX_ON 2 44 45 46 typedef void (*rf_pa_callback_t)(int type); 47 extern rf_pa_callback_t blc_rf_pa_cb; 48 49 50 51 void rf_pa_init(void); 52 53 54 #endif /* BLT_PA_H_ */ 55