Cpc_system_common
Description
CPC System Endpoint Common.
Macros |
|
#define | EP_ID_TO_PROPERTY_ID (ep_id) ((sli_cpc_property_id_t)((0x00001000 | ((ep_id) & 0x000000FF)))) |
Helper macros to convert an enpoint id (uint8_t) to a PROP_ENDPOINT_STATE_x enum value.
|
|
#define | PROPERTY_ID_TO_EP_ID (property_id) ((uint8_t)(property_id) & 0x000000FF) |
Helper macros to convert a PROP_ENDPOINT_STATE_x enum value to an endpoint id (uint8_t).
|
|
#define | AGGREGATED_STATE_LOW (agg) (( sl_cpc_endpoint_state_t )(agg & 0x0F)) |
Helper macros to extract the two aggregated endpoint states encoded in one single byte.
|
|
#define | AGGREGATED_STATE_HIGH (agg) (( sl_cpc_endpoint_state_t )(agg >> 4)) |
#define | GET_ENDPOINT_STATE_FROM_STATES (payload, ep_id) |
#define | CPC_CAPABILITIES_SECURITY_ENDPOINT_MASK (1 << 0) |
Capabilities mask.
|
|
#define | CPC_CAPABILITIES_PACKED_ENDPOINT_MASK (1 << 1) |
#define | CPC_CAPABILITIES_GPIO_ENDPOINT_MASK (1 << 2) |
#define | CPC_CAPABILITIES_UART_FLOW_CONTROL_MASK (1 << 3) |
#define | PAYLOAD_LENGTH_MAX 16 |
System endpoint command type.
|
|
Enumerations |
|
enum |
sl_cpc_system_status_t
{
STATUS_OK = 0, STATUS_FAILURE = 1, STATUS_UNIMPLEMENTED = 2, STATUS_INVALID_ARGUMENT = 3, STATUS_INVALID_STATE = 4, STATUS_INVALID_COMMAND = 5, STATUS_INVALID_INTERFACE = 6, STATUS_INTERNAL_ERROR = 7, STATUS_SECURITY_ERROR = 8, STATUS_PARSE_ERROR = 9, STATUS_IN_PROGRESS = 10, STATUS_NOMEM = 11, STATUS_BUSY = 12, STATUS_PROP_NOT_FOUND = 13, STATUS_PACKET_DROPPED = 14, STATUS_EMPTY = 15, STATUS_CMD_TOO_BIG = 16, STATUS_NO_ACK = 17, STATUS_CCA_FAILURE = 18, STATUS_ALREADY = 19, STATUS_ITEM_NOT_FOUND = 20, STATUS_INVALID_COMMAND_FOR_PROP = 21, STATUS_RESET_POWER_ON = 112, STATUS_RESET_EXTERNAL = 113, STATUS_RESET_SOFTWARE = 114, STATUS_RESET_FAULT = 115, STATUS_RESET_CRASH = 116, STATUS_RESET_ASSERT = 117, STATUS_RESET_OTHER = 118, STATUS_RESET_UNKNOWN = 119, STATUS_RESET_WATCHDOG = 120 } |
Enumeration representing spinel protocol status code.
|
|
Macro Definition Documentation
◆ EP_ID_TO_PROPERTY_ID
#define EP_ID_TO_PROPERTY_ID | ( |
ep_id
|
) | ((sli_cpc_property_id_t)((0x00001000 | ((ep_id) & 0x000000FF)))) |
Helper macros to convert an enpoint id (uint8_t) to a PROP_ENDPOINT_STATE_x enum value.
◆ PROPERTY_ID_TO_EP_ID
#define PROPERTY_ID_TO_EP_ID | ( |
property_id
|
) | ((uint8_t)(property_id) & 0x000000FF) |
Helper macros to convert a PROP_ENDPOINT_STATE_x enum value to an endpoint id (uint8_t).
◆ AGGREGATED_STATE_LOW
#define AGGREGATED_STATE_LOW | ( |
agg
|
) | (( sl_cpc_endpoint_state_t )(agg & 0x0F)) |
Helper macros to extract the two aggregated endpoint states encoded in one single byte.
◆ GET_ENDPOINT_STATE_FROM_STATES
#define GET_ENDPOINT_STATE_FROM_STATES | ( |
payload,
|
|
ep_id
|
|||
) |
Value:
((ep_id % 2 == 0) ?
AGGREGATED_STATE_LOW
(((uint8_t*)payload)[ep_id / 2]) \
: AGGREGATED_STATE_HIGH(((uint8_t*)payload)[ep_id / 2]))
◆ CPC_CAPABILITIES_SECURITY_ENDPOINT_MASK
#define CPC_CAPABILITIES_SECURITY_ENDPOINT_MASK (1 << 0) |
Capabilities mask.
- Note
- Used with the value returned by a property-get on PROP_CAPABILITIES.
◆ PAYLOAD_LENGTH_MAX
#define PAYLOAD_LENGTH_MAX 16 |
System endpoint command type.
Enumeration Type Documentation
◆ sl_cpc_system_status_t
Enumeration representing spinel protocol status code.