![]() |
ISF
2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
|
Command Interpreter (CI) protocol file containing the protocol routing table. More...
Go to the source code of this file.
Functions | |
isf_status_t | ci_mbox_init (uint8, void *) |
isf_status_t | ci_protocol_CB_mbox (uint32, uint8 *, uint32 *, uint8 *) |
isf_status_t | ci_stream_init (uint8, void *) |
This is a CI stream protocol intialization callback function pointer. More... | |
isf_status_t | ci_protocol_CB_stream (uint32, uint8 *, uint32 *, uint8 *) |
This is a CI stream protocol callback function pointer. More... | |
uint32 | isf_ci_get_recv_size (void) |
CI Receive buffer size. More... | |
Variables | |
ci_protocol_initdata_ptr_t | ci_protocol_initptr_table [] |
CI protocol user defined initialization data pointer table. More... | |
const ci_protocol_t | ci_protocol_table [] |
CI protocol routing table. More... | |
Command Interpreter (CI) protocol file containing the protocol routing table.
Definition in file isf_ci_protocol.c.
isf_status_t ci_mbox_init | ( | uint8 | , |
void * | |||
) |
Definition at line 528 of file ci_protocol_mbox.c.
References _fw_device_info_get(), qr_config_t::appId, qr_config_t::byte_id, ci_callback, CI_PROTOCOL_ID_INDEX, ci_update_first_data_mb(), ci_regs_t::ciCtrlReg, isf_ci_app_write(), ISF_ERR_LIB_INIT, ISF_SUCCESS, MAX_ISF_APPLICATIONS, MAX_NUM_MAILBOXES, ci_regs_t::qr_config, and ci_ctrl_reg_t::reg.
isf_status_t ci_protocol_CB_mbox | ( | uint32 | , |
uint8 * | , | ||
uint32 * | , | ||
uint8 * | |||
) |
Definition at line 795 of file ci_protocol_mbox.c.
References ci_host_cmd_packet_t::appId, ci_host_cmd_packet_t::byte_cnt, ci_app_resp_packet_t::bytes_left, ci_app_resp_packet_t::bytes_xfer, ccitt_crc16_cal(), ci_callback, CI_CMD_DEBUG_LOOPBACK, CI_CMD_LAST, CI_CMD_READ_VERSION, CI_CMD_RESET_APP, CI_CMD_UPDATE_QUICKREAD, CI_CMD_WRITE_CONFIG, CI_CMD_WRITE_SREC_FLASH, CI_ERROR_CB_NOT_REGISTERED, CI_ERROR_COMMAND, CI_ERROR_INVALID_LENGTH, CI_ERROR_NONE, CI_ERROR_PARAM, ci_get_first_mailbox, ci_get_wr_appid, ci_get_wr_cmd, ci_get_wr_cmdId, ci_get_wr_cnt, ci_get_wr_offset, ci_insert_crc, CI_INVALID_COUNT, CI_PROTOCOL_DATA_OFFSET, CI_PROTOCOL_ID_SIZE, CI_RW_NULL, ci_send_packet(), ci_host_cmd_packet_t::cmd, CMD_PACKET_BITS, COCO_BIT_MASK, FIRST_DATA_MAILBOX_NUM, ISF_SUCCESS, MAX_NUM_MAILBOXES, MB_APP_RESP_SIZE, MB_HOST_CMD, MB_HOST_CMD_SIZE, MB_RESP_APP_ID, MB_RESP_BYTES_XFER, MB_RESP_COUNT, MB_RESP_STATUS_CC, MBOX_CRC_BYTE_SIZE, ci_host_cmd_packet_t::offset, and ci_app_resp_packet_t::rw.
isf_status_t ci_protocol_CB_stream | ( | uint32 | , |
uint8 * | , | ||
uint32 * | , | ||
uint8 * | |||
) |
This is a CI stream protocol callback function pointer.
A callback that implements the CI stream protocol. This callback is invoked if a packet is received with a protocol ID matching the ID that was assigned to this protocol during initialization.
[in] | anumBytes | The number of bytes that the host has sent to the protocol. The data resides in the apSrc buffer. |
[in] | apSrc | Pointer to the received data from the host. |
[in,out] | apnumDestBytes | As an input, this parameter specifies maxinum size of the destination buffer apDest. As an output this parameter specifies the actual size of the number of bytes used in the buffer apDest. |
[out] | apDest | Pointer to the processed data. |
The | callback function returns the protocol ID value of the next protocol to be invoked. If no more protocols are to be called, the callback function returns a zero to notify the CI to sends the destination buffer to the host. |
Definition at line 1010 of file ci_protocol_stream.c.
References ci_stream_ctrl_reg1_t::Bits, ccitt_crc16_cal(), CI_ALLOC_MEM_ZERO, CI_CMD_STREAM_CREATE_STREAM, CI_CMD_STREAM_DELETE_STREAM, CI_CMD_STREAM_DISABLE_CRC, CI_CMD_STREAM_DISABLE_DATA_UPDATE, CI_CMD_STREAM_ENABLE_CRC, CI_CMD_STREAM_ENABLE_DATA_UPDATE, CI_CMD_STREAM_GETINFO_GET_FIRST_STREAMID, CI_CMD_STREAM_GETINFO_GET_NEXT_STREAMID, CI_CMD_STREAM_GETINFO_NUMBER_STREAMS, CI_CMD_STREAM_GETINFO_STREAM_CONFIG, CI_CMD_STREAM_GETINFO_TRIGGER_STATE, CI_CMD_STREAM_RESET, CI_CMD_STREAM_RESET_TRIGGER, CI_COPY_MEM, CI_FREE_MEM, ci_send_packet(), CI_STATUS_STREAM_ERR, CI_STATUS_STREAM_ERR_CRC, CI_STATUS_STREAM_ERR_INVALID_CMD, CI_STATUS_STREAM_ERR_INVALID_NUM_PARM, CI_STATUS_STREAM_ERR_INVALID_PARM, CI_STATUS_STREAM_ERR_OUT_OF_MEMORY, CI_STATUS_STREAM_ERR_STREAM_NOEXISTS, CI_STATUS_STREAM_ERR_STREAMID_NOEXISTS, CI_STATUS_STREAM_STREAM_END_OF_LIST, ci_stream_config_t, ci_stream_element_t, ci_stream_get_host_cmd, ci_stream_get_num_element_bytes(), ci_stream_get_num_trig_bytes(), CI_STREAM_NUMELEMENTS_BYTESIZE, CI_STREAM_OUTPUTPACKET_STREAMID_BYTESIZE, cmd_createstream_get_numelements, cmd_createstream_get_streamID, cmd_createstream_get_trigmask_ptr, ci_stream_ctrl_reg1_t::enable_crc, ci_stream_ctrl_reg1_t::enable_stream_data, FALSE, isf_ci_stream_create(), isf_ci_stream_delete(), isf_ci_stream_get_first(), isf_ci_stream_get_next(), isf_ci_stream_get_num_streams(), isf_ci_stream_reset_trigger(), isf_ci_stream_set_CRC(), ISF_SUCCESS, STREAM_COCO_BIT_MASK, STREAM_CRC_BYTESIZE, STREAM_CRC_DISABLED, STREAM_CRC_ENABLED, STREAM_PROTOCOL_CMD_BYTESIZE, STREAM_PROTOCOL_DATA_DISABLED, STREAM_PROTOCOL_DATA_ENABLED, STREAM_PROTOCOL_RECV_MIN_BYTESIZE, STREAM_PROTOCOL_RESP_DEFAULT_ARRAY_BYTESIZE, STREAM_PROTOCOL_RESP_INDEX_CMD_ECHO, STREAM_PROTOCOL_RESP_INDEX_COCO_STAT, STREAM_PROTOCOL_RESP_INDEX_DATASTART, STREAM_PROTOCOL_RESP_INDEX_NUMDATA_LSB, STREAM_PROTOCOL_RESP_INDEX_NUMDATA_MSB, STREAM_PROTOCOL_RESP_INDEX_PROTOCOLID, STREAM_PROTOCOL_RESP_MIN_BYTESIZE, STREAM_PROTOCOL_RESP_RESPDATALENGTH_BYTESIZE, ci_stream_regs_t::StreamCtrlReg1, and TRUE.
isf_status_t ci_stream_init | ( | uint8 | , |
void * | |||
) |
This is a CI stream protocol intialization callback function pointer.
A callback that implements the initialization for the CI stream protocol.
[in] | aprotocolID | The protocol ID assigned to the protocol. The protocol initialization function is required to save the ID and include the ID in data packets sent back to the host. |
[in] | apInitData | Pointer to the user defined data. |
ISF_SUCCESS | The initialization callback completed successfully. |
ISF_ERR_LIB_INIT | The initialization callback failed to initialize. |
Definition at line 85 of file ci_protocol_stream.c.
References ISF_ERR_LIB_INIT, and ISF_SUCCESS.
uint32 isf_ci_get_recv_size | ( | void | ) |
CI Receive buffer size.
Definition at line 31 of file isf_ci_protocol.c.
Referenced by ci_init().
ci_protocol_initdata_ptr_t ci_protocol_initptr_table[] |
CI protocol user defined initialization data pointer table.
Definition at line 42 of file isf_ci_protocol.c.
Referenced by ci_init().
const ci_protocol_t ci_protocol_table[] |
CI protocol routing table.
Definition at line 53 of file isf_ci_protocol.c.