ISSDK  1.8
IoT Sensing Software Development Kit
Functions | Variables
host_io_uart.c File Reference

The host_io_uart.c file contains definitions for UART based streaming interface for sending and reseiving messages to and from Host using ISSDK Host Protocol. More...

#include <stdlib.h>
#include "fsl_common.h"
#include "host_io_uart.h"
#include "register_io_i2c.h"
#include "register_io_spi.h"
#include "data_format_hdlc.h"
#include "data_format_json.h"
Include dependency graph for host_io_uart.c:

Go to the source code of this file.

Functions

void HOST_SignalEvent_t (uint32_t event)
 Defines the HOST UART signal event handler. More...
 
uint8_t getSlaveIndex (uint8_t slaveAddress)
 
void Host_IO_Add_ISO_Header (uint8_t streamID, uint8_t *pStreamingPacket, size_t sizePayload)
 
uint8_t Host_IO_Init (ARM_DRIVER_USART *pDrv, void *pBus, void *pDevInfo, void *spiSlaveParams, uint16_t slaveAddress)
 
void Host_IO_Send (uint8_t *pMsg, size_t size, uint8_t encoding)
 
void Host_IO_Receive (host_cmd_proc_fn_t process_host_command, uint8_t encoding)
 

Variables

host_interface_handle_t gHostHandle = {0}
 
uint8_t gUartRxBuff
 
uint8_t gHostRxBuff [HOST_RX_BUF_LEN]
 
host_rx_packet_t gHostRxPkt = {.pRxbuf = gHostRxBuff}
 
host_channel_params_t gHostChannelParams [MAX_HOST_STREAMS]
 
volatile bool bUartTxComplete
 
volatile bool bUartRxPendingMsg
 
volatile bool bUartErrorMsg
 

Detailed Description

The host_io_uart.c file contains definitions for UART based streaming interface for sending and reseiving messages to and from Host using ISSDK Host Protocol.

Definition in file host_io_uart.c.

Function Documentation

◆ getSlaveIndex()

uint8_t getSlaveIndex ( uint8_t  slaveAddress)

Definition at line 64 of file host_io_uart.c.

References MAX_HOST_STREAMS.

Referenced by Host_IO_Receive().

Here is the caller graph for this function:

◆ Host_IO_Add_ISO_Header()

void Host_IO_Add_ISO_Header ( uint8_t  streamID,
uint8_t *  pStreamingPacket,
size_t  sizePayload 
)

Definition at line 86 of file host_io_uart.c.

References HOST_ISO_LEN_LSB_OFFSET, HOST_ISO_LEN_MSB_OFFSET, HOST_ISO_PAYLOAD_OFFSET, HOST_MSG_HDR_TAG_OFFSET, and HOST_PRO_INT_ISO_TAG.

Referenced by main().

Here is the caller graph for this function:

◆ Host_IO_Init()

uint8_t Host_IO_Init ( ARM_DRIVER_USART *  pDrv,
void *  pBus,
void *  pDevInfo,
void *  spiSlaveParams,
uint16_t  slaveAddress 
)

◆ Host_IO_Receive()

void Host_IO_Receive ( host_cmd_proc_fn_t  process_host_command,
uint8_t  encoding 
)

◆ Host_IO_Send()

void Host_IO_Send ( uint8_t *  pMsg,
size_t  size,
uint8_t  encoding 
)

Definition at line 136 of file host_io_uart.c.

References bUartTxComplete, HDLC_Process_Tx_Msg(), HOST_FORMAT_HDLC, HOST_FORMAT_JSON, HOST_FORMAT_PLAIN, HOST_Send(), and JSON_Process_Tx_Msg().

Referenced by Host_IO_Receive(), main(), and process_host_command().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HOST_SignalEvent_t()

void HOST_SignalEvent_t ( uint32_t  event)

Defines the HOST UART signal event handler.

The Signal Event Handler function required by host_io_uart.c.

Parameters
[in]eventThe UART event that occured.
Constraints:
None
Reentrant: Yes
Returns
void

Definition at line 47 of file host_io_uart.c.

References bUartErrorMsg, bUartRxPendingMsg, and bUartTxComplete.

Referenced by Host_IO_Init().

Here is the caller graph for this function:

Variable Documentation

◆ bUartErrorMsg

volatile bool bUartErrorMsg

Definition at line 41 of file host_io_uart.c.

Referenced by Host_IO_Init(), Host_IO_Receive(), and HOST_SignalEvent_t().

◆ bUartRxPendingMsg

volatile bool bUartRxPendingMsg

Definition at line 41 of file host_io_uart.c.

Referenced by Host_IO_Init(), Host_IO_Receive(), and HOST_SignalEvent_t().

◆ bUartTxComplete

volatile bool bUartTxComplete

Definition at line 41 of file host_io_uart.c.

Referenced by Host_IO_Init(), Host_IO_Send(), and HOST_SignalEvent_t().

◆ gHostChannelParams

Definition at line 40 of file host_io_uart.c.

◆ gHostHandle

host_interface_handle_t gHostHandle = {0}

Definition at line 37 of file host_io_uart.c.

◆ gHostRxBuff

uint8_t gHostRxBuff[HOST_RX_BUF_LEN]

Definition at line 38 of file host_io_uart.c.

Referenced by Host_IO_Receive().

◆ gHostRxPkt

host_rx_packet_t gHostRxPkt = {.pRxbuf = gHostRxBuff}

Definition at line 39 of file host_io_uart.c.

◆ gUartRxBuff

uint8_t gUartRxBuff

Definition at line 38 of file host_io_uart.c.

Referenced by Host_IO_Init(), and Host_IO_Receive().