TuyaOS
结构体 | 宏定义 | 类型定义 | 枚举 | 函数
ffc_app.h 文件参考

Common process - wifi ffc 更多...

#include <stdint.h>
ffc_app.h 的引用(Include)关系图:

浏览源代码.

结构体

struct  ffc_cb_t
 callback define when ffc init 更多...
 

宏定义

#define ffc_bind   tuya_iot_wifi_ffc_bind
 
#define ffc_control   tuya_iot_wifi_ffc_control
 
#define ffc_init   tuya_iot_wifi_ffc_init
 
#define FFC_LOWPOWER_EVENT   "ffc.lowpower"
 
#define FFC_MASTER   0x01
 
#define ffc_send   tuya_iot_wifi_ffc_send
 
#define FFC_SLAVER   0x02
 
#define ffc_unbind   tuya_iot_wifi_ffc_unbind
 

类型定义

typedef int(* ffc_fittings_cb) (ffc_fittings_msg_t *msg)
 
typedef int(* ffc_recv_cb) (uint8_t *data_cmd, uint16_t data_len)
 
typedef int(* ffc_status_cb) (ffc_cb_state_t state)
 

枚举

enum  ffc_cb_state_t {
  FFC_INIT_STATE = 0 , FFC_CONTROL_STATE , FFC_BINDING_BEGIN_STATE , FFC_BINDING_SUCCESS_STATE ,
  FFC_BINDING_FINSH_STATE
}
 
enum  ffc_fittings_event_t { FFC_FITTINGS_SYNC_EVENT , FFC_FITTINGS_ACTIVE_EVENT }
 
enum  ffc_flag_t { FFC_CHANNEL_SCAN_FLAG = 0x01 , FFC_MASTER_GROUP_SET_FLAG , FFC_MASTER_TYPE_SET_FLAG }
 
enum  ffc_group_t {
  FFC_GROUP_0 = 0x00 , FFC_GROUP_1 , FFC_GROUP_2 , FFC_GROUP_3 ,
  FFC_GROUP_MAX
}
 
enum  ffc_master_type_t {
  FFC_MASTER_TYPE_LOCAL = 0 , FFC_MASTER_TYPE_FITTINGS = 1 , FFC_MASTER_TYPE_DEVICE = 2 , FFC_MASTER_TYPE_ONLINE = FFC_MASTER_TYPE_DEVICE ,
  FFC_MASTER_TYPE_MAX
}
 FFC_MASTER_TYPE_LOCAL -> FFC_MASTER_TYPE_FITTINGS
 

函数

int tuya_iot_wifi_ffc_bind (uint16_t timeout_s)
 ffc bind function 更多...
 
int tuya_iot_wifi_ffc_control (int flag, void *data)
 ffc control 更多...
 
int tuya_iot_wifi_ffc_init (uint8_t role, ffc_status_cb *status_cb, ffc_recv_cb *recv_cb)
 ffc init function,must called first 更多...
 
int tuya_iot_wifi_ffc_send (uint8_t *data, uint16_t len)
 ffc send 更多...
 
int tuya_iot_wifi_ffc_unbind (uint16_t timeout_s)
 ffc unbind function 更多...
 

详细描述

Common process - wifi ffc

版本
0.1
日期
2020-05-13

函数说明

◆ tuya_iot_wifi_ffc_bind()

int tuya_iot_wifi_ffc_bind ( uint16_t  timeout_s)

ffc bind function

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

◆ tuya_iot_wifi_ffc_control()

int tuya_iot_wifi_ffc_control ( int  flag,
void *  data 
)

ffc control

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

◆ tuya_iot_wifi_ffc_init()

int tuya_iot_wifi_ffc_init ( uint8_t  role,
ffc_status_cb *  status_cb,
ffc_recv_cb *  recv_cb 
)

ffc init function,must called first

参数
[in]rolemaster or slaver
[in]status_cbuser status callback
[in]recv_cbuser received callback
返回
OPRT_OK on success. Others error, please refer to tuya_error_code.h

◆ tuya_iot_wifi_ffc_send()

int tuya_iot_wifi_ffc_send ( uint8_t *  data,
uint16_t  len 
)

ffc send

参数
[in]datasend buf
[in]lensend length
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_iot_wifi_ffc_unbind()

int tuya_iot_wifi_ffc_unbind ( uint16_t  timeout_s)

ffc unbind function

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