TuyaOS
|
This is tuya tal_adc file 更多...
#include "tal_bluetooth_mesh_def.h"
函数 | |
OPERATE_RET | tal_element_register (USHORT_T element_index) |
Function to register a elemennt. 更多... | |
VOID | tal_firmware_infor_set (UCHAR_T is_key, UCHAR_T *product_id, UCHAR_T *product_key, UINT_T version, UINT_T mesh_category, UCHAR_T need_publish_addr) |
Set the firmware information which mesh provision use. 更多... | |
UCHAR_T | tal_get_if_prov_success (VOID) |
Get the mesh node provision state. 更多... | |
USHORT_T * | tal_group_addr_sub_list_get (USHORT_T ele_idx, USHORT_T model_id) |
Function to get the subscribe addr list of a model of the element. 更多... | |
OPERATE_RET | tal_group_addr_sub_set (UINT_T opcode, USHORT_T ele_index, USHORT_T group_addr) |
Function to subscribe a group address for a model of the element. 更多... | |
OPERATE_RET | tal_mesh_ble_recv_cb_init (TAL_BLE_EVT_FUNC_CB ble_event) |
Register the ble gap & gatt data callback . 更多... | |
OPERATE_RET | tal_mesh_data_send (USHORT_T src_addr, USHORT_T dst_addr, UINT_T opcode, UCHAR_T *data, USHORT_T data_len) |
Function to send mesh data to unicast/group addr 更多... | |
VOID | tal_mesh_fast_prov_enable (UCHAR_T enable) |
Enable/Disable mesh fast provision. 更多... | |
OPERATE_RET | tal_mesh_msg_recv_cb_init (tal_mesh_msg_recv_cb access_data_cb) |
Register the mesh access app data callback . 更多... | |
OPERATE_RET | tal_mesh_network_state_set (MESH_NETWORK_STATE_SET_T net_state) |
Set the mesh node network state. 更多... | |
VOID | tal_mesh_node_provision_enable (MESH_PROVISION_TYPE_T enable) |
Function to enable/disable the provision. If node is unprovision state,using disable param will close the GATT unprovision adv and mesh unprovision beacon, and mesh fast provision will be disabled. 更多... | |
TUYA_WEAK_ATTRIBUTE VOID | tal_mesh_state_callback (TAL_MESH_NET_STATE_T state) |
The callback to recieve the network state. 更多... | |
VOID | tal_mesh_uuid_set (UCHAR_T *uuid) |
Init the mesh node uuid. 更多... | |
OPERATE_RET | tal_model_register (USHORT_T element_index, UINT_T model_id) |
Function to register a model into the element. 更多... | |
USHORT_T | tal_primary_ele_addr_get (VOID) |
Get the mesh node primary element address. 更多... | |
VOID | tal_primary_ele_addr_set (USHORT_T addr, int flash_save_en) |
Set the mesh node primary element address. 更多... | |
This is tuya tal_adc file
OPERATE_RET tal_element_register | ( | USHORT_T | element_index | ) |
Function to register a elemennt.
[in] | element_index | index of element |
VOID tal_firmware_infor_set | ( | UCHAR_T | is_key, |
UCHAR_T * | product_id, | ||
UCHAR_T * | product_key, | ||
UINT_T | version, | ||
UINT_T | mesh_category, | ||
UCHAR_T | need_publish_addr | ||
) |
Set the firmware information which mesh provision use.
[in] | is_key | use product key or product id |
[in] | product_id | product id |
[in] | product_key | product key |
[in] | version | firmware version |
[in] | mesh_category | mesh category define by tuya |
[in] | need_publish_addr | if the device need a publish addr distributed by tuya cloud |
UCHAR_T tal_get_if_prov_success | ( | VOID | ) |
Get the mesh node provision state.
USHORT_T * tal_group_addr_sub_list_get | ( | USHORT_T | ele_idx, |
USHORT_T | model_id | ||
) |
Function to get the subscribe addr list of a model of the element.
[in] | ele_index | the index of element |
[in] | group_addr | group address |
OPERATE_RET tal_group_addr_sub_set | ( | UINT_T | opcode, |
USHORT_T | ele_index, | ||
USHORT_T | group_addr | ||
) |
Function to subscribe a group address for a model of the element.
[in] | opcode | to indicate subscribe or delete |
[in] | ele_index | the index of element |
[in] | group_addr | group address |
OPERATE_RET tal_mesh_ble_recv_cb_init | ( | TAL_BLE_EVT_FUNC_CB | ble_event | ) |
Register the ble gap & gatt data callback .
[in] | ble_event | ble gap & gatt data receive callback |
OPERATE_RET tal_mesh_data_send | ( | USHORT_T | src_addr, |
USHORT_T | dst_addr, | ||
UINT_T | opcode, | ||
UCHAR_T * | data, | ||
USHORT_T | data_len | ||
) |
Function to send mesh data to unicast/group addr
[in] | src_addr | unicast addr of node,if use 0,it will use node primary element addr |
[in] | dst_addr | destinat addr |
[in] | opcode | mesh op code |
[in] | data | mesh data |
[in] | data_len | data point |
VOID tal_mesh_fast_prov_enable | ( | UCHAR_T | enable | ) |
Enable/Disable mesh fast provision.
[in] | enable | 0:disable 1:enable |
OPERATE_RET tal_mesh_msg_recv_cb_init | ( | tal_mesh_msg_recv_cb | access_data_cb | ) |
Register the mesh access app data callback .
[in] | access_data_cb | mesh access data receive callback |
OPERATE_RET tal_mesh_network_state_set | ( | MESH_NETWORK_STATE_SET_T | net_state | ) |
Set the mesh node network state.
[in] | net_state | network state |
VOID tal_mesh_node_provision_enable | ( | MESH_PROVISION_TYPE_T | enable | ) |
Function to enable/disable the provision. If node is unprovision state,using disable param will close the GATT unprovision adv and mesh unprovision beacon, and mesh fast provision will be disabled.
[in] | enable | enable/disable |
TUYA_WEAK_ATTRIBUTE VOID tal_mesh_state_callback | ( | TAL_MESH_NET_STATE_T | state | ) |
The callback to recieve the network state.
[in] | state | network state |
VOID tal_mesh_uuid_set | ( | UCHAR_T * | uuid | ) |
Init the mesh node uuid.
[in] | uuid | mesh universally unique identifier |
OPERATE_RET tal_model_register | ( | USHORT_T | element_index, |
UINT_T | model_id | ||
) |
Function to register a model into the element.
[in] | element_index | index of element |
[in] | model_id | model id such as: 0x1000 = generic on off model |
USHORT_T tal_primary_ele_addr_get | ( | VOID | ) |
Get the mesh node primary element address.
VOID tal_primary_ele_addr_set | ( | USHORT_T | addr, |
int | flash_save_en | ||
) |
Set the mesh node primary element address.
[in] | addr | unicast address |
[in] | flash_save_en | save in flash or only update in ram |