• 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 #include <stdbool.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /**
24  * @brief ATE API
25  * @defgroup bk_ate API group
26  * @{
27  */
28 
29 /**
30  * @brief     Init the ATE driver
31  *
32  * This API inits the resoure for ATE mode.
33  *
34  * @attention 1. This API re-use UART TX PIN.(UART Port defined as CONFIG_UART_ATE_PORT in bkxxxx.defconfig)
35  *               it should be called before UART APIs and after GPIO inited.
36  *
37  * @return
38  *    - BK_OK: succeed
39  *    - others: other errors.
40  */
41 int bk_ate_init(void);
42 
43 /**
44  * @brief     Deinit the ATE driver:Do nothing
45  *
46  * @return
47  *    - BK_OK: succeed
48  *    - others: other errors.
49  */
50 int bk_ate_deinit(void);
51 
52 /**
53  * @brief     Get the ATE mode is whether enable
54  *
55  * @attention 1. This API depends on HW(UART TX PIN is whether inputed low level when DUT power on)
56  *				 After the bk_ate_init, it will not change the ATE enable status.
57  * @return
58  *    - BK_OK: succeed
59  *    - others: other errors.
60  */
61 bool ate_is_enabled(void);
62 
63 /**
64  * @}
65  */
66 
67 
68 #ifdef __cplusplus
69 }
70 #endif
71