![]() |
ISF
2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
|
Command interpreter task header file. This file is internal ISF code. More...
Go to the source code of this file.
Data Structures | |
struct | ci_tx_packet_t |
This structure holds information to send a packet of data to the host. A task will fill the structure with the information and enable transmit buffer empty. The ISR will send the data byte by byte until all data is sent. More... | |
struct | ci_rx_packet_t |
This structure holds information to receive a packet of data to the host. CI will fill the structure with the information as it receives it from the ISR and will notify the CI task when a packet has been fully received. More... | |
Macros | |
#define | CI_PACKET_MARKER (0x7E) |
Packet maker. Each packet is delineated by this character. More... | |
#define | CI_ALLOC_MEM_ZERO(x) OSA_MemAllocZero(x) |
Memory allocation abstraction. More... | |
#define | CI_FREE_MEM(x) OSA_MemFree(x) |
#define | CI_COPY_MEM(src, dest, size) isf_mem_copy(src, dest, size) |
#define | ci_get_protocol_id() ((uint8)ci_rx_packet.pRxbuf[CI_PROTOCOL_ID_INDEX]) |
Retrieve the protocol ID. More... | |
Enumerations | |
enum | ci_recv_state_t { CI_RX_STATE_NULL = 0, CI_RX_STATE_WAITFORPACKETMARKER1, CI_RX_STATE_GETTINGPACKETDATA2 } |
States for receiving a packet. More... | |
enum | ci_tx_state_t { CI_TX_STATE_NULL = 0, CI_TX_STATE_SEND_STARTMARKER1, CI_TX_STATE_SEND_PACKETDATA2, CI_TX_STATE_SEND_ENDMARKER4 } |
States for sending a packet. More... | |
enum | ci_escape_state_enum { CI_ESCAPE_STATE_WAIT_1ST_CHAR = 0, CI_ESCAPE_STATE_WAIT_2ND_CHAR } |
States for encoding/decoding escape characters. More... | |
enum | ci_packet_recv_status_t { CI_PACKET_RECV_STATUS_NO = 0, CI_PACKET_RECV_STATUS_YES } |
Packet received status. More... | |
Functions | |
void | task_ci (uint32 initial_data) |
Command Interpreter Task - main task to handle communication via mailboxes with the host. More... | |
isf_status_t | ci_send_packet (uint32 anumBytes, uint8 *apSrc) |
CI send packet - main function to send data to host. More... | |
Command interpreter task header file. This file is internal ISF code.
Definition in file task_ci.h.
#define CI_ALLOC_MEM_ZERO | ( | x | ) | OSA_MemAllocZero(x) |
Memory allocation abstraction.
Definition at line 113 of file task_ci.h.
Referenced by ci_init(), ci_protocol_CB_stream(), and isf_ci_stream_create().
#define CI_COPY_MEM | ( | src, | |
dest, | |||
size | |||
) | isf_mem_copy(src, dest, size) |
Definition at line 116 of file task_ci.h.
Referenced by ci_protocol_CB_stream(), isf_ci_stream_create(), and isf_ci_stream_update_data().
#define CI_FREE_MEM | ( | x | ) | OSA_MemFree(x) |
Definition at line 114 of file task_ci.h.
Referenced by ci_protocol_CB_stream(), isf_ci_stream_create(), and isf_ci_stream_delete().
#define ci_get_protocol_id | ( | ) | ((uint8)ci_rx_packet.pRxbuf[CI_PROTOCOL_ID_INDEX]) |
#define CI_PACKET_MARKER (0x7E) |
Packet maker. Each packet is delineated by this character.
Definition at line 26 of file task_ci.h.
Referenced by ci_send_packet(), and process_recv_byte().
enum ci_escape_state_enum |
enum ci_recv_state_t |
enum ci_tx_state_t |
isf_status_t ci_send_packet | ( | uint32 | anumBytes, |
uint8 * | apSrc | ||
) |
CI send packet - main function to send data to host.
anumBytes | - number of bytes to transmit. |
apSrc | - pointer to source of data to transmit. |
Definition at line 338 of file task_ci.c.
References ci_tx_packet_t::bytesLeft, CI_ESCAPE_STATE_WAIT_1ST_CHAR, CI_ESCAPE_STATE_WAIT_2ND_CHAR, CI_PACKET_MARKER, CI_TX_STATE_NULL, CI_TX_STATE_SEND_ENDMARKER4, CI_TX_STATE_SEND_PACKETDATA2, CI_TX_STATE_SEND_STARTMARKER1, dm_device_write(), FALSE, ISF_CI_FAILURE, ISF_SUCCESS, packet_marker, ci_tx_packet_t::pTxbuf, TRUE, and ci_tx_packet_t::txState.
Referenced by ci_protocol_CB_mbox(), ci_protocol_CB_stream(), isf_ci_qr_update(), and isf_ci_stream_update_data().