TuyaOS
结构体 | 类型定义 | 函数
mf_test.h 文件参考

Common process - mf test 更多...

#include "tuya_cloud_types.h"
#include "tuya_cloud_com_defs.h"
mf_test.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  MF_IMPORT_INTF_S
 Definition of mf test init configure 更多...
 

类型定义

typedef VOID_T(* APP_PROD_CB) (BOOL_T flag, SCHAR_T rssi)
 callback for app product test 更多...
 
typedef BOOL_T(* MF_GPIO_TEST_CB) (IN CONST CHAR_T *in, OUT CHAR_T *out)
 callback for GPIO test 更多...
 
typedef BOOL_T(* MF_PRE_GPIO_TEST_CB) (VOID)
 callback for preposed GPIO test 更多...
 
typedef VOID(* MF_UART_FREE_CB) (VOID)
 callback for UART free function
 
typedef VOID(* MF_UART_INIT_CB) (UINT_T baud, UINT_T bufsz)
 callback for URAT init function 更多...
 
typedef UINT_T(* MF_UART_RECV_CB) (OUT BYTE_T *buf, IN CONST UINT_T len)
 callback for URAT receive function 更多...
 
typedef VOID(* MF_UART_SEND_CB) (IN BYTE_T *data, IN CONST UINT_T len)
 callback for URAT send function 更多...
 
typedef OPERATE_RET(* MF_USER_BASIC_TEST_CB) (USHORT_T cmd, UCHAR_T *data, UINT_T len)
 callback for user basic test 更多...
 
typedef VOID(* MF_USER_CALLBACK) (VOID)
 callback for user
 
typedef OPERATE_RET(* MF_USER_PARAM_CB) (IN CONST BYTE_T *data, IN CONST UINT_T len)
 callback after write user param finish 更多...
 
typedef OPERATE_RET(* MF_USER_PRODUCT_TEST_CB) (USHORT_T cmd, UCHAR_T *data, UINT_T len, OUT UCHAR_T **ret_data, OUT USHORT_T *ret_len)
 callback for user product test 更多...
 

函数

VOID mf_cmd_basic_send (BYTE_T cmd, BYTE_T *data, UINT_T len)
 The entry of basic cmd test 更多...
 
VOID mf_cmd_product_send (IN CONST USHORT_T cmd, IN CONST BYTE_T *data, IN CONST UINT_T len)
 The entry of product test 更多...
 
OPERATE_RET mf_init (IN CONST MF_IMPORT_INTF_S *intf, IN CHAR_T *file_name, IN CHAR_T *file_ver, IN BOOL_T wrMacEn)
 mf test init fucntion 更多...
 
BOOL_T mf_save_hwreset_status (VOID)
 mf save hwreset status 更多...
 
OPERATE_RET mf_test_facpin_get (OUT CHAR_T facpin[20+1])
 get facpin 更多...
 
VOID mf_test_ignore_close_flag (VOID)
 ignore mf test closed flag
 
BOOL_T mf_test_is_timeout (VOID)
 judge if mf test is timeout 更多...
 
VOID mf_user_param_cb_set (MF_USER_PARAM_CB cb)
 set callback function for product test 更多...
 
BOOL_T wd_mf_test_close_if_read (VOID)
 read the flag in flash,to check if mf test closed 更多...
 
OPERATE_RET wd_mf_test_close_if_write (IN BOOL_T mf_close)
 close mf test,save the flag in flash 更多...
 

详细描述

Common process - mf test

版本
0.1
日期
2017-11-06

类型定义说明

◆ APP_PROD_CB

typedef VOID_T(* APP_PROD_CB) (BOOL_T flag, SCHAR_T rssi)

callback for app product test

参数
[in]flag
[in]rssi

◆ MF_GPIO_TEST_CB

typedef BOOL_T(* MF_GPIO_TEST_CB) (IN CONST CHAR_T *in, OUT CHAR_T *out)

callback for GPIO test

参数
[in]inThe data in
[out]outThe data out
返回
TRUE/FALSE,GPIO test success or not

◆ MF_PRE_GPIO_TEST_CB

typedef BOOL_T(* MF_PRE_GPIO_TEST_CB) (VOID)

callback for preposed GPIO test

返回
TRUE/FALSE

◆ MF_UART_INIT_CB

typedef VOID(* MF_UART_INIT_CB) (UINT_T baud, UINT_T bufsz)

callback for URAT init function

参数
[in]bauddata bits:8bit,parity:none,stop bits:1
[in]bufszSize of buff

◆ MF_UART_RECV_CB

typedef UINT_T(* MF_UART_RECV_CB) (OUT BYTE_T *buf, IN CONST UINT_T len)

callback for URAT receive function

参数
[in]lenbuf len
[out]bufReceived data buf
返回
read data len

◆ MF_UART_SEND_CB

typedef VOID(* MF_UART_SEND_CB) (IN BYTE_T *data, IN CONST UINT_T len)

callback for URAT send function

参数
[in]dataSend data buf
[in]lenSend data buf len

◆ MF_USER_BASIC_TEST_CB

typedef OPERATE_RET(* MF_USER_BASIC_TEST_CB) (USHORT_T cmd, UCHAR_T *data, UINT_T len)

callback for user basic test

参数
[in]cmdTest command
[in]dataTest data
[in]lenTest data len
[out]ret_dataTest return data
[out]ret_lenTest return data len
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ MF_USER_PARAM_CB

typedef OPERATE_RET(* MF_USER_PARAM_CB) (IN CONST BYTE_T *data, IN CONST UINT_T len)

callback after write user param finish

参数
[in]dataThe data user in
[in]lenData len
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ MF_USER_PRODUCT_TEST_CB

typedef OPERATE_RET(* MF_USER_PRODUCT_TEST_CB) (USHORT_T cmd, UCHAR_T *data, UINT_T len, OUT UCHAR_T **ret_data, OUT USHORT_T *ret_len)

callback for user product test

参数
[in]cmdTest command
[in]dataTest data
[in]lenTest data len
[out]ret_dataTest return data
[out]ret_lenTest return data len
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

函数说明

◆ mf_cmd_basic_send()

VOID mf_cmd_basic_send ( BYTE_T  cmd,
BYTE_T *  data,
UINT_T  len 
)

The entry of basic cmd test

参数
[in]cmdTest command
[in]dataTest data
[in]lenTest data len

◆ mf_cmd_product_send()

VOID mf_cmd_product_send ( IN CONST USHORT_T  cmd,
IN CONST BYTE_T *  data,
IN CONST UINT_T  len 
)

The entry of product test

参数
[in]cmdTest command
[in]dataTest data
[in]lenTest data len

◆ mf_init()

OPERATE_RET mf_init ( IN CONST MF_IMPORT_INTF_S intf,
IN CHAR_T *  file_name,
IN CHAR_T *  file_ver,
IN BOOL_T  wrMacEn 
)

mf test init fucntion

参数
[in]intfmf test configure data
[in]file_nameAPP bin name
[in]file_verUser Software version
[in]wrMacEnNeed wirte MAC or not
注解
some fireware need write MAC when mf test
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ mf_save_hwreset_status()

BOOL_T mf_save_hwreset_status ( VOID  )

mf save hwreset status

返回
TRUE/FLASE

◆ mf_test_facpin_get()

OPERATE_RET mf_test_facpin_get ( OUT CHAR_T  facpin[20+1])

get facpin

参数
[out]facpin
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ mf_test_is_timeout()

BOOL_T mf_test_is_timeout ( VOID  )

judge if mf test is timeout

返回
TRUE/FALSE

◆ mf_user_param_cb_set()

VOID mf_user_param_cb_set ( MF_USER_PARAM_CB  cb)

set callback function for product test

参数
[in]cb

◆ wd_mf_test_close_if_read()

BOOL_T wd_mf_test_close_if_read ( VOID  )

read the flag in flash,to check if mf test closed

返回
TRUE/FLASE

◆ wd_mf_test_close_if_write()

OPERATE_RET wd_mf_test_close_if_write ( IN BOOL_T  mf_close)

close mf test,save the flag in flash

参数
[in]mf_closeClose flag
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h