API for ZRC profile includes cmd discovery and RC commands.
#include "rf4ce.h"
Data Structures | |
struct | zrc_cmd_frm_tag |
ZRC command frame structure. More... | |
Macros | |
#define | aplcKeyExchangeTransferCount_def aplcMinKeyExchangeTransferCount |
Default value of the key exchange transfer count. More... | |
#define | aplcMaxCmdDiscRxOnDuration 200 /* ms */ |
The maximum duration that the receiver is enabled on a controller after pairing to receive any command discovery request command frames. More... | |
#define | aplcMaxKeyRepeatInterval_ms 100 /* ms */ |
The maximum time between consecutive user control repeated command frame transmissions. More... | |
#define | aplcMaxPairIndicationWaitTime 1.2 /* 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 (aplcMaxPairIndicationWaitTime * 1000000L) |
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 | 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 * 1000L) |
The maximum time a device shall wait for a response command frame following a request command frame. More... | |
#define | aplcMinKeyExchangeTransferCount 3 |
The minimum value of the KeyExTransferCount parameter passed to the pair request primitive during the push button pairing procedure. More... | |
#define | aplcMinTargetBlackoutPeriod 100 /* ms */ |
The minimum amount of time a device must wait after a successful pairing attempt with a target before attempting command discovery. More... | |
#define | aplcMinTargetBlackoutPeriod_us (aplcMinTargetBlackoutPeriod * 1000L) |
The minimum amount of time a device must wait after a successful pairing attempt with a target before attempting command discovery. More... | |
#define | aplKeyRepeatInterval_def (aplcMaxKeyRepeatInterval_ms) |
Default value of the key repeat interval. More... | |
#define | aplKeyRepeatWaitTime_def (2 * aplcMaxKeyRepeatInterval_ms) |
Default value of the key repeat wait time. More... | |
#define | AUTO_DISC_DURATION_SYM 0x1C9C38 |
The automatic discovery response mode duration shall be set to 0x1c9c38 (30s). More... | |
#define | DISCOVERY_DURATION 0x00186A |
ZRC profile constants. More... | |
#define | DISCOVERY_REPETITION_INTERVAL 0x00F424 |
Default value for the discovery repetition interval. More... | |
#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... | |
Typedefs | |
typedef enum cec_code_tag | cec_code_t |
Enums used for the RC command codes / CEC commands from HDMI spec. More... | |
typedef enum zrc_cmd_code_tag | zrc_cmd_code_t |
Enums used for ZRC command codes. More... | |
typedef struct zrc_cmd_frm_tag | zrc_cmd_frm_t |
ZRC command frame structure. More... | |
Functions | |
void | zrc_cmd_disc_confirm (nwk_enum_t Status, uint8_t PairingRef, uint8_t *SupportedCmd) |
Callback ZRC command discovery confirm. More... | |
void | zrc_cmd_disc_indication (uint8_t PairingRef) |
Callback ZRC command discovery indication. More... | |
bool | zrc_cmd_disc_request (uint8_t PairingRef) |
Sends the ZRC command discovery request. More... | |
bool | zrc_cmd_disc_response (uint8_t PairingRef, uint8_t *SupportedCmd) |
ZRC command discovery response. More... | |
void | zrc_cmd_indication (uint8_t PairingRef, uint8_t nsduLength, uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags) |
Prints RC command code text; used for example apps and debugging. More... | |
void | zrc_data_confirm (nwk_enum_t Status, uint8_t PairingRef) |
Handle the data confirm (received from network layer). More... | |
void | zrc_data_indication (uint8_t PairingRef, uint8_t nsduLength, uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags) |
Handles the cmd data indications received from the network layer. More... | |
#define aplcKeyExchangeTransferCount_def aplcMinKeyExchangeTransferCount |
Default value of the key exchange transfer count.
#define aplcMaxCmdDiscRxOnDuration 200 /* ms */ |
The maximum duration that the receiver is enabled on a controller after pairing to receive any command discovery request command frames.
#define aplcMaxKeyRepeatInterval_ms 100 /* ms */ |
The maximum time between consecutive user control repeated command frame transmissions.
#define aplcMaxPairIndicationWaitTime 1.2 /* 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.
Unit is seconds.
#define aplcMaxPairIndicationWaitTime_us (aplcMaxPairIndicationWaitTime * 1000000L) |
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.
Unit is micro seconds.
#define aplcMaxResponseWaitTime 200 /* ms */ |
The maximum time a device shall wait for a response command frame following a request command frame.
Unit is milli seconds.
#define aplcMaxResponseWaitTime_us (aplcMaxResponseWaitTime * 1000L) |
The maximum time a device shall wait for a response command frame following a request command frame.
Unit is micro seconds.
#define aplcMinKeyExchangeTransferCount 3 |
The minimum value of the KeyExTransferCount parameter passed to the pair request primitive during the push button pairing procedure.
#define aplcMinTargetBlackoutPeriod 100 /* ms */ |
The minimum amount of time a device must wait after a successful pairing attempt with a target before attempting command discovery.
Unit is milli seconds.
#define aplcMinTargetBlackoutPeriod_us (aplcMinTargetBlackoutPeriod * 1000L) |
The minimum amount of time a device must wait after a successful pairing attempt with a target before attempting command discovery.
Unit is micro seconds.
#define aplKeyRepeatInterval_def (aplcMaxKeyRepeatInterval_ms) |
Default value of the key repeat interval.
#define aplKeyRepeatWaitTime_def (2 * aplcMaxKeyRepeatInterval_ms) |
Default value of the key repeat wait time.
#define AUTO_DISC_DURATION_SYM 0x1C9C38 |
The automatic discovery response mode duration shall be set to 0x1c9c38 (30s).
#define DISCOVERY_DURATION 0x00186A |
ZRC profile constants.
Controller discovery duration
#define DISCOVERY_REPETITION_INTERVAL 0x00F424 |
Default value for the discovery repetition interval.
#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.
typedef enum cec_code_tag cec_code_t |
Enums used for the RC command codes / CEC commands from HDMI spec.
(See Annex A: Mandatory command matrix)
typedef enum zrc_cmd_code_tag zrc_cmd_code_t |
Enums used for ZRC command codes.
typedef struct zrc_cmd_frm_tag zrc_cmd_frm_t |
ZRC command frame structure.
enum cec_code_tag |
Enums used for the RC command codes / CEC commands from HDMI spec.
(See Annex A: Mandatory command matrix)
enum zrc_cmd_code_tag |
void zrc_cmd_disc_confirm | ( | nwk_enum_t | Status, |
uint8_t | PairingRef, | ||
uint8_t * | SupportedCmd | ||
) |
Callback ZRC command discovery confirm.
The command discovery confirm callback provides information about the sent command discovery request.
Status | Status of the sent command discovery request |
PairingRef | Pairing reference used for the command discovery request |
SupportedCmd | Pointer to 32 byte array containing the supported commands |
Callback ZRC command discovery confirm.
request command was receiced.
Status | nwk status |
PairingRef | Pairing Ref for destination. |
SupportedCmd | Supported commands by destination node. |
References UNUSED.
void zrc_cmd_disc_indication | ( | uint8_t | PairingRef | ) |
Callback ZRC command discovery indication.
The command discovery indication callback indicates that a command discovery request command was receiced.
PairingRef | Pairing reference used for the command discovery request |
Callback ZRC command discovery indication.
PairingRef | Pairing Ref for the source. |
Reset QT600-Interface board
References AG_PERIODIC, CH_AGILITY_EXECUTION, IDLE, node_status, nwk_ch_agility_request(), PGM_READ_BLOCK, RESET_QT600_OFF, and zrc_cmd_disc_response().
bool zrc_cmd_disc_request | ( | uint8_t | PairingRef | ) |
Sends the ZRC command discovery request.
The command discovery request allows a node to query which user control commands are supported on a remote node, i.e. those specified in the user control pressed command frame.
PairingRef | Pairing reference of the device to address the request. |
Referenced by pbp_pair_confirm().
bool zrc_cmd_disc_response | ( | uint8_t | PairingRef, |
uint8_t * | SupportedCmd | ||
) |
ZRC command discovery response.
The command discovery response allows a device to answer to an incoming command discovery request.
PairingRef | Pairing reference used for the command discovery request |
SupportedCmd | Pointer to 32 byte array containing supported CEC commands |
Referenced by zrc_cmd_disc_indication().
void zrc_cmd_indication | ( | uint8_t | PairingRef, |
uint8_t | nsduLength, | ||
uint8_t * | nsdu, | ||
uint8_t | RxLinkQuality, | ||
uint8_t | RxFlags | ||
) |
Prints RC command code text; used for example apps and debugging.
command | CEC command code |
PairingRef | Pairing reference |
VendorId | Vendor Id information |
CmdCode | ZRC cmd code (Press/Release) |
CmdLength | Length of the rc cmd (rc cmd code + Payload) |
Cmd | Pointer to payload data, i.e. RC command; rc command code (rc cmd code + Payload) |
TxOptions | Transmission options (Eg. ack, security etc) |
Status | Status of the command request |
PairingRef | Pairing reference |
RcCmd | RC command code. API indicating a received the command to ZRC application. |
PairingRef | Pairing reference of the source node |
nsduLength | Length of the received data |
nsdu | Pointer to payload data, i.e. RC command |
RxLinkQuality | Link quality of received packet |
RxFlags | Rx Flags. |
Prints RC command code text; used for example apps and debugging.
PairingRef | Pairing reference |
nsduLength | Length of the payload. |
nsdu | Actual payload |
RxLinkQuality | Link quality of received packet. |
RxFlags | Rx Flags. |
Receive the data on RF4CE Link, Store in Tx_Buffer and Send to TWI interface
References zrc_cmd_frm_tag::fcf, LED_DATA, LED_TOGGLE, pal_led(), PutChar(), rf4ce_new_msg, UNUSED, and USER_CONTROL_PRESSED.
void zrc_data_confirm | ( | nwk_enum_t | Status, |
uint8_t | PairingRef | ||
) |
Handle the data confirm (received from network layer).
Status | Status received from the network layer. |
PairingRef | Pairing reference |
void zrc_data_indication | ( | uint8_t | PairingRef, |
uint8_t | nsduLength, | ||
uint8_t * | nsdu, | ||
uint8_t | RxLinkQuality, | ||
uint8_t | RxFlags | ||
) |
Handles the cmd data indications received from the network layer.
(cmd discovery and remote control commands).
PairingRef | Pairing reference |
nsduLength | Length of the received data |
nsdu | Actual data |
RxLinkQuality | Link quality of received packet |
RxFlags | Rx Flags. |