• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 //TODO more optimization for APIs in this headers
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 uint8_t phy_open_cca(void);
24 uint8_t phy_close_cca(void);
25 uint8_t phy_show_cca(void);
26 
27 void cmd_rfcali_cfg_mode(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
28 void cmd_rfcali_cfg_rate_dist(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
29 void cmd_rfcali_cfg_tssi_g(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
30 void cmd_rfcali_cfg_tssi_b(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
31 void cmd_rfcali_show_data(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
32 void cmd_cali(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
33 
34 #if CONFIG_PSRAM
35 void cmd_psram(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
36 #endif
37 
38 void tx_evm_cmd_test(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
39 void rx_sens_cmd_test(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
40 
41 int bkreg_run_command(const char *content, int cnt);
42 
43 //TODO move to better place
44 void bk7011_cal_bias(void);
45 
46 int manual_cal_get_macaddr_from_flash(uint8_t *mac_ptr);
47 int manual_cal_write_macaddr_to_flash(uint8_t *mac_ptr);
48 void manual_cal_temp_pwr_unint(void);
49 
50 int do_evm(void *cmdtp, int flag, int argc, char *const argv[]);
51 int do_rx_sensitivity(void *cmdtp, int flag, int argc, char *const argv[]);
52 
53 #define LA_SAMPLE_TEST 1
54 void cmd_la_sample_test(char *pcWriteBuffer, int xWriteBufferLen, int argc, char **argv);
55 
56 UINT32 bk7011_set_sample_mac_out_for_ate(UINT32 sample_len);
57 void bk7011_clear_sample_mac_out_for_ate(void);
58 UINT32 bk7011_get_sample_mac_out_for_ate(UINT8 **buf, uint32_t *len);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63