API for ZID profile.
#include "rf4ce.h"
#include "nwk_internal.h"
#include "zid_build_config.h"
#include "gdp.h"
#include "nwk_config.h"
Data Structures | |
struct | contact_data_report_tag |
struct | hid_adaptor_attr_tag |
struct | hid_attr_tag |
struct | keyboard_input_desc_tag |
struct | keyboard_output_desc_tag |
struct | mouse_desc_tag |
struct | null_report_tag |
struct | pair_table_tag |
struct | pinch_gesture_report_tag |
struct | rotation_gesture_report_tag |
struct | scroll_gesture_report_tag |
struct | sync_report_tag |
struct | tap_gesture_report_tag |
struct | tap_support_properties_tag |
struct | touch_sensor_properties_tag |
struct | zid_ib_tag |
ZID information base. More... | |
struct | zid_indication_callback_tag |
struct for zrc indication callback. More... | |
struct | zid_report_data_record_tag |
ZID profile constants. More... | |
Macros | |
#define | aplcIdleRateGuardTime 1500 /* 1500 ms */ |
ZID profile constants. More... | |
#define | aplcIdleRateGuardTime_us (aplcIdleRateGuardTime * 1000UL) |
#define | aplcKeyExchangeTransferCount_def 0x24 /* as per ZID spec */ |
#define | aplcMaxConfigPrepTime 200 /* 200ms */ |
The maximum time a HID class device shall take to construct a push attributes command frame and send it to the HID adaptor during its configuration state. More... | |
#define | aplcMaxConfigPrepTime_us (aplcMaxConfigPrepTime * 1000UL) |
#define | aplcMaxConfigWaitTime 300 /* ms */ |
The maximum time the HID adaptor shall wait to receive a push attributes command frame from a HID class device during its configuration state. More... | |
#define | aplcMaxConfigWaitTime_us (aplcMaxConfigWaitTime * 1000UL) |
#define | aplcMaxHIDRxOnWaitTime 100 /* ms */ |
The maximum time a HID class device originator shall wait for a response to a heartbeat command frame or a request to stay awake via the data pending subfield of the frame control field of an incoming frame. More... | |
#define | aplcMaxHIDRxOnWaitTime_us (aplcMaxHIDRxOnWaitTime * 1000UL) |
#define | aplcMaxNonStdDescCompSize 256 /* bytes */ |
The maximum size of a single non standard descriptor component. More... | |
#define | aplcMaxNonStdDescCompsPerHID 4 |
The maximum number of non standard descriptors that can be supported on a HID class device. More... | |
#define | aplcMaxNonStdDescFragmentSize 80 /* bytes */ |
The maximum size of a non standard descriptor fragment that will fit in an over-the-air frame. More... | |
#define | aplcMaxNullReportSize 16 /* bytes */ |
The maximum size of a NULL report. More... | |
#define | aplcMaxPairIndicationWaitTime 1 /* second */ |
The maximum amount of time a device waits after receiving a successful NLME-AUTO-DISCOVERY.confirm primitive for a pair indication to arrive from the pairing initiator. More... | |
#define | aplcMaxPairIndicationWaitTime_us |
#define | aplcMaxReportRepeatInterval 100 /* ms */ |
The maximum time between consecutive report data transmissions. More... | |
#define | aplcMaxReportRepeatInterval_us (aplcMaxReportRepeatInterval * 1000UL) |
#define | aplcMaxResponseWaitTime 200 /* ms */ |
The maximum time a device shall wait for a response command frame following a request command frame. More... | |
#define | aplcMaxResponseWaitTime_us (aplcMaxResponseWaitTime * 1000UL) |
#define | aplcMaxStdDescCompsPerHID 12 |
The maximum number of standard descriptors that can be supported on a HID class device. More... | |
#define | aplcMinIntPipeUnsafeTxWindowTime 50 /* ms */ |
Minimum window time permitted when using the interrupt pipe before a safe transmission is required. More... | |
#define | aplcMinIntPipeUnsafeTxWindowTime_us |
#define | aplcMinKeyExchangeTransferCount 3 |
The minimum value of the KeyExTransferCount parameter passed to the pair request primitive during the push button pairing procedure. More... | |
#define | aplZIDProfileVersion_def 0x0001 |
#define | AUTO_DISC_DURATION_SYM 0x1C9C38 |
The automatic discovery response mode duration shall be set to 0x1c9c38 (30s). More... | |
#define | DISCOVERY_DURATION 0x00186A |
ZID profile initial NIB attributes. More... | |
#define | DISCOVERY_REPETITION_INTERVAL 0x00F424 |
Default value for the discovery repetition interval. More... | |
#define | HID_COUNTRY_CODE 0x00 |
#define | HID_DEVICE_RELEASE_NUMBER 0x0000 |
#define | HID_DEVICE_SUB_CLASS ZID_NO_SUBCLASS |
#define | HID_NUM_DESCRIPTORS 0 |
#define | HID_NUM_NULL_REPORTS 0 |
#define | HID_NUM_STD_DESCRIPTORS 2 |
#define | HID_NUMBER_ENDPOINTS 0x02 |
#define | HID_PARSER_VERSION 0x0111 |
ZID profile constants. More... | |
#define | HID_POLL_INTERVAL 1 |
#define | HID_PRODUCT_ID 0x0000 |
#define | HID_PROTOCOL_CODE PROTOCOL_CODE_NONE |
#define | HID_STD_DESCRIPTOR_LIST_0 MOUSE |
#define | HID_STD_DESCRIPTOR_LIST_1 KEYBOARD |
#define | HID_STD_DESCRIPTOR_LIST_2 0 |
#define | HID_STD_DESCRIPTOR_LIST_3 0 |
#define | HID_VENDOR_ID 0x1014 |
#define | MAX_DISCOVERY_REPETITIONS 0x1E |
Default value for maximum number of times the discovery request command is sent. More... | |
#define | MAX_REPORTED_NODE_DESCRIPTORS 1 |
Default value for Number of reported node descriptor received during discovery process. More... | |
#define | TXO_CTRL_PIPE 0x80 |
Constant defines used for TxOption field for report data transmission mode. More... | |
#define | TXO_INTER_PIPE 0x00 |
Functions | |
bool | check_zid_adaptor_compatibility (uint8_t PairingRef, uint8_t payload_length, uint8_t *payload) |
bool | get_attribute_properties (uint8_t PairingRef, zid_attribute_t attribute_id, uint8_t index, uint8_t *length, uint8_t *value) |
void | register_zid_indication_callback (zid_indication_callback_t *zid_ind_callback) |
Registering zrc indication callback. More... | |
bool | send_generic_response (uint8_t PairingRef, gdp_response_code_t code) |
bool | zid_get_attribute_request (bool OTA, uint8_t PairingRef, zid_attribute_t ZIDAttribute, uint8_t ZIDAttributeIndex, FUNC_PTR zid_get_attribute_confirm) |
bool | zid_get_report_data_request (uint8_t PairingRef, zid_report_types_t zid_report_type, zid_report_desc_t zid_report_desc, uint8_t TxOptions, FUNC_PTR zid_get_report_confirm) |
bool | zid_heartbeat_request (uint8_t PairingRef, FUNC_PTR zid_heartbeat_confirm) |
bool | zid_org_connect_request (uint8_t OrgAppCapabilities, dev_type_t OrgDevTypeList[DEVICE_TYPE_LIST_SIZE], profile_id_t OrgProfileIdList[PROFILE_ID_LIST_SIZE], dev_type_t SearchDevType, uint8_t DiscProfileIdListSize, profile_id_t DiscProfileIdList[PROFILE_ID_LIST_SIZE], FUNC_PTR zid_connect_confirm) |
bool | zid_report_data_request (uint8_t PairingRef, uint8_t numReportRecords, zid_report_data_record_t *reportRecord, uint8_t TxOptions, FUNC_PTR zid_report_data_confirm) |
void | zid_reset (bool SetDefault) |
void | zid_reset_attributes (void) |
bool | zid_set_attribute_request (uint8_t PairingRef, zid_attribute_t ZIDAttribute, uint8_t ZIDAttributeIndex, uint8_t *ZIDAttributeValue, FUNC_PTR zid_set_attribute_confirm) |
bool | zid_set_null_report (uint8_t report_index, null_report_t *null_report_ptr) |
#define aplcIdleRateGuardTime 1500 /* 1500 ms */ |
ZID profile constants.
The length of time the HID adaptor will repeat a report from a remote HID class device when its idle rate is non-zero, before a direct report command frame must be received from the remote HID class device.
#define aplcIdleRateGuardTime_us (aplcIdleRateGuardTime * 1000UL) |
#define aplcKeyExchangeTransferCount_def 0x24 /* as per ZID spec */ |
#define aplcMaxConfigPrepTime 200 /* 200ms */ |
The maximum time a HID class device shall take to construct a push attributes command frame and send it to the HID adaptor during its configuration state.
#define aplcMaxConfigPrepTime_us (aplcMaxConfigPrepTime * 1000UL) |
#define aplcMaxConfigWaitTime 300 /* ms */ |
The maximum time the HID adaptor shall wait to receive a push attributes command frame from a HID class device during its configuration state.
#define aplcMaxConfigWaitTime_us (aplcMaxConfigWaitTime * 1000UL) |
#define aplcMaxHIDRxOnWaitTime 100 /* ms */ |
The maximum time a HID class device originator shall wait for a response to a heartbeat command frame or a request to stay awake via the data pending subfield of the frame control field of an incoming frame.
#define aplcMaxHIDRxOnWaitTime_us (aplcMaxHIDRxOnWaitTime * 1000UL) |
#define aplcMaxNonStdDescCompSize 256 /* bytes */ |
The maximum size of a single non standard descriptor component.
The HID adaptor shall be able to store descriptor components of this size for each component stored on a device.
#define aplcMaxNonStdDescCompsPerHID 4 |
The maximum number of non standard descriptors that can be supported on a HID class device.
The HID adaptor shall be able to store this many non standard descriptors for each paired HID class device.
#define aplcMaxNonStdDescFragmentSize 80 /* bytes */ |
The maximum size of a non standard descriptor fragment that will fit in an over-the-air frame.
#define aplcMaxNullReportSize 16 /* bytes */ |
The maximum size of a NULL report.
The HID adaptor shall be able to store NULL reports of this size for each component stored on a device.
#define aplcMaxPairIndicationWaitTime 1 /* second */ |
The maximum amount of time a device waits after receiving a successful NLME-AUTO-DISCOVERY.confirm primitive for a pair indication to arrive from the pairing initiator.
#define aplcMaxPairIndicationWaitTime_us |
#define aplcMaxReportRepeatInterval 100 /* ms */ |
The maximum time between consecutive report data transmissions.
#define aplcMaxReportRepeatInterval_us (aplcMaxReportRepeatInterval * 1000UL) |
#define aplcMaxResponseWaitTime 200 /* ms */ |
The maximum time a device shall wait for a response command frame following a request command frame.
#define aplcMaxResponseWaitTime_us (aplcMaxResponseWaitTime * 1000UL) |
#define aplcMaxStdDescCompsPerHID 12 |
The maximum number of standard descriptors that can be supported on a HID class device.
The HID adaptor shall be able to store this many standard descriptors for each paired HID class device.
#define aplcMinIntPipeUnsafeTxWindowTime 50 /* ms */ |
Minimum window time permitted when using the interrupt pipe before a safe transmission is required.
#define aplcMinIntPipeUnsafeTxWindowTime_us |
#define aplcMinKeyExchangeTransferCount 3 |
The minimum value of the KeyExTransferCount parameter passed to the pair request primitive during the push button pairing procedure.
#define aplZIDProfileVersion_def 0x0001 |
#define AUTO_DISC_DURATION_SYM 0x1C9C38 |
The automatic discovery response mode duration shall be set to 0x1c9c38 (30s).
#define DISCOVERY_DURATION 0x00186A |
ZID profile initial NIB attributes.
Controller discovery duration
#define DISCOVERY_REPETITION_INTERVAL 0x00F424 |
Default value for the discovery repetition interval.
#define HID_COUNTRY_CODE 0x00 |
#define HID_DEVICE_RELEASE_NUMBER 0x0000 |
#define HID_DEVICE_SUB_CLASS ZID_NO_SUBCLASS |
#define HID_NUM_DESCRIPTORS 0 |
#define HID_NUM_NULL_REPORTS 0 |
#define HID_NUM_STD_DESCRIPTORS 2 |
#define HID_NUMBER_ENDPOINTS 0x02 |
#define HID_PARSER_VERSION 0x0111 |
ZID profile constants.
#define HID_POLL_INTERVAL 1 |
#define HID_PRODUCT_ID 0x0000 |
#define HID_PROTOCOL_CODE PROTOCOL_CODE_NONE |
#define HID_STD_DESCRIPTOR_LIST_0 MOUSE |
#define HID_STD_DESCRIPTOR_LIST_1 KEYBOARD |
#define HID_STD_DESCRIPTOR_LIST_2 0 |
#define HID_STD_DESCRIPTOR_LIST_3 0 |
#define HID_VENDOR_ID 0x1014 |
#define MAX_DISCOVERY_REPETITIONS 0x1E |
Default value for maximum number of times the discovery request command is sent.
#define MAX_REPORTED_NODE_DESCRIPTORS 1 |
Default value for Number of reported node descriptor received during discovery process.
#define TXO_CTRL_PIPE 0x80 |
Constant defines used for TxOption field for report data transmission mode.
#define TXO_INTER_PIPE 0x00 |
typedef struct contact_data_report_tag contact_data_report_t |
typedef struct hid_adaptor_attr_tag hid_adaptor_attr_t |
typedef struct hid_attr_tag hid_attr_t |
typedef struct keyboard_input_desc_tag keyboard_input_desc_t |
typedef struct keyboard_output_desc_tag keyboard_output_desc_t |
typedef struct mouse_desc_tag mouse_desc_t |
typedef struct null_report_tag null_report_t |
typedef struct pair_table_tag pair_table_t |
typedef struct pinch_gesture_report_tag pinch_gesture_report_t |
typedef struct rotation_gesture_report_tag rotation_gesture_report_t |
typedef struct scroll_gesture_report_tag scroll_gesture_report_t |
typedef struct sync_report_tag sync_report_t |
typedef struct tap_gesture_report_tag tap_gesture_report_t |
typedef struct tap_support_properties_tag tap_support_properties_t |
typedef struct touch_sensor_properties_tag touch_sensor_properties_t |
typedef void(* vendor_data_ind_cb_t)(uint8_t PairingRef, uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags) |
typedef enum zid_attribute_status_tag zid_attribute_status_t |
Attribute status.
typedef enum zid_attribute_tag zid_attribute_t |
ZID attribute Ids.
typedef enum zid_cmd_code_tag zid_cmd_code_t |
ZID command codes.
typedef void(* zid_connect_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef) |
typedef void(* zid_data_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef) |
typedef enum zid_device_subclass_tag zid_device_subclass_t |
ZID device subclass.
typedef void(* zid_get_attribute_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef, zid_attribute_t ZIDAttribute, uint8_t ZIDAttributeIndex, uint8_t AttributeSize, uint8_t *ZIDAttributeValue) |
typedef void(* zid_get_report_indication_cb_t)(uint8_t PairingRef, zid_report_types_t zid_report_type, zid_report_desc_t zid_report_desc, uint8_t RxLinkQuality, uint8_t RxFlags) |
typedef void(* zid_heartbeat_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef) |
typedef struct zid_ib_tag zid_ib_t |
ZID information base.
typedef struct zid_indication_callback_tag zid_indication_callback_t |
struct for zrc indication callback.
App should use this struct to register indication callback functions
typedef enum zid_protocol_code_tag zid_protocol_code_t |
ZID protocol code.
typedef enum zid_protocol_tag zid_protocol_t |
ZID protocol.
typedef void(* zid_report_data_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef) |
typedef void(* zid_report_data_indication_cb_t)(uint8_t PairingRef, uint8_t num_report_records, zid_report_data_record_t *zid_report_data_record_ptr, uint8_t RxLinkQuality, uint8_t RxFlags) |
typedef struct zid_report_data_record_tag zid_report_data_record_t |
ZID profile constants.
typedef enum zid_report_desc_tag zid_report_desc_t |
typedef enum zid_report_types_tag zid_report_types_t |
ZID report type field values.
typedef void(* zid_set_attribute_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef, zid_attribute_t ZIDAttribute, uint8_t ZIDAttributeIndex) |
typedef enum zid_standby_tag zid_standby_t |
enum zid_attribute_tag |
ZID attribute Ids.
enum zid_cmd_code_tag |
enum zid_protocol_tag |
enum zid_report_desc_tag |
enum zid_report_types_tag |
enum zid_standby_tag |
bool check_zid_adaptor_compatibility | ( | uint8_t | PairingRef, |
uint8_t | payload_length, | ||
uint8_t * | payload | ||
) |
bool get_attribute_properties | ( | uint8_t | PairingRef, |
zid_attribute_t | attribute_id, | ||
uint8_t | index, | ||
uint8_t * | length, | ||
uint8_t * | value | ||
) |
void register_zid_indication_callback | ( | zid_indication_callback_t * | zid_ind_callback | ) |
Registering zrc indication callback.
The application needs to register the zrc indication call back functions so that the corresponding indication function will get called by the profile on receiving the indication from the network layer.
zrc_indication_callback_t | indication callback struct |
Referenced by zid_indication_callback_init().
bool send_generic_response | ( | uint8_t | PairingRef, |
gdp_response_code_t | code | ||
) |
bool zid_get_attribute_request | ( | bool | OTA, |
uint8_t | PairingRef, | ||
zid_attribute_t | ZIDAttribute, | ||
uint8_t | ZIDAttributeIndex, | ||
FUNC_PTR | zid_get_attribute_confirm | ||
) |
Referenced by handle_incoming_msg().
bool zid_get_report_data_request | ( | uint8_t | PairingRef, |
zid_report_types_t | zid_report_type, | ||
zid_report_desc_t | zid_report_desc, | ||
uint8_t | TxOptions, | ||
FUNC_PTR | zid_get_report_confirm | ||
) |
Referenced by handle_incoming_msg().
Referenced by handle_incoming_msg().
bool zid_org_connect_request | ( | uint8_t | OrgAppCapabilities, |
dev_type_t | OrgDevTypeList[DEVICE_TYPE_LIST_SIZE], | ||
profile_id_t | OrgProfileIdList[PROFILE_ID_LIST_SIZE], | ||
dev_type_t | SearchDevType, | ||
uint8_t | DiscProfileIdListSize, | ||
profile_id_t | DiscProfileIdList[PROFILE_ID_LIST_SIZE], | ||
FUNC_PTR | zid_connect_confirm | ||
) |
Referenced by handle_incoming_msg().
bool zid_report_data_request | ( | uint8_t | PairingRef, |
uint8_t | numReportRecords, | ||
zid_report_data_record_t * | reportRecord, | ||
uint8_t | TxOptions, | ||
FUNC_PTR | zid_report_data_confirm | ||
) |
Referenced by handle_incoming_msg().
void zid_reset | ( | bool | SetDefault | ) |
void zid_reset_attributes | ( | void | ) |
bool zid_set_attribute_request | ( | uint8_t | PairingRef, |
zid_attribute_t | ZIDAttribute, | ||
uint8_t | ZIDAttributeIndex, | ||
uint8_t * | ZIDAttributeValue, | ||
FUNC_PTR | zid_set_attribute_confirm | ||
) |
Referenced by handle_incoming_msg().
bool zid_set_null_report | ( | uint8_t | report_index, |
null_report_t * | null_report_ptr | ||
) |
Referenced by handle_incoming_msg().