ISSDK  1.7
IoT Sensing Software Development Kit
Macros | Functions | Variables
host_demo.c File Reference

The host_demo.c file implements the ISSDK HOST I/O Demo. More...

#include "board.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "Driver_USART.h"
#include "issdk_hal.h"
#include "gpio_driver.h"
#include "host_io_uart.h"
#include "systick_utils.h"
#include "auto_detection_service.h"
Include dependency graph for host_demo.c:

Go to the source code of this file.

Macros

#define APPLICATION_NAME   "HOST_DEMO"
 Unique Name for this application which should match the target GUI pkg name. More...
 
#define APPLICATION_VERSION   "1.0"
 Version to distinguish between instances the same application based on target Shield and updates. More...
 

Functions

bool process_host_command (uint8_t tag, uint8_t *hostCommand, uint8_t *hostResponse, size_t *hostMsgSize, size_t respBufferSize)
 
int main (void)
 Main function. More...
 

Variables

char boardString [ADS_MAX_STRING_LENGTH] = {0}
 
char shieldString [ADS_MAX_STRING_LENGTH] = {0}
 
char embAppName [ADS_MAX_STRING_LENGTH] = {0}
 

Detailed Description

The host_demo.c file implements the ISSDK HOST I/O Demo.

Definition in file host_demo.c.

Macro Definition Documentation

◆ APPLICATION_NAME

#define APPLICATION_NAME   "HOST_DEMO"

Unique Name for this application which should match the target GUI pkg name.

Definition at line 59 of file host_demo.c.

Referenced by main().

◆ APPLICATION_VERSION

#define APPLICATION_VERSION   "1.0"

Version to distinguish between instances the same application based on target Shield and updates.

Definition at line 61 of file host_demo.c.

Referenced by main().

Function Documentation

◆ main()

int main ( void  )

Main function.

Initialize the MCU hardware.

Initialize GREEN LED pin used by FRDM board

Initialize the UART driver.

Set the UART Power mode.

Set UART Baud Rate.

Initialize Host I/O.

Definition at line 125 of file host_demo.c.

References ADS_MAX_STRING_LENGTH, APPLICATION_NAME, APPLICATION_VERSION, BOARD_BootClockRUN, BOARD_DEBUG_UART_BAUDRATE, BOARD_RunADS(), BOARD_SystickEnable(), boardString, Driver_GPIO_KSDK, embAppName, GPIO_DIRECTION_OUT, GREEN_LED, HOST_FORMAT_HDLC, HOST_FORMAT_PLAIN, Host_IO_Init(), Host_IO_Receive(), Host_IO_Send(), HOST_S_DRIVER, HOST_S_SIGNAL_EVENT, int32_t(), pGpioDriver, GENERIC_DRIVER_GPIO::pin_init, process_host_command(), SHIELD_NAME, shieldString, SMC, SMC_SetPowerModeWait(), status, and GENERIC_DRIVER_GPIO::toggle_pin.

Here is the call graph for this function:

◆ process_host_command()

bool process_host_command ( uint8_t  tag,
uint8_t *  hostCommand,
uint8_t *  hostResponse,
size_t *  hostMsgSize,
size_t  respBufferSize 
)

Definition at line 73 of file host_demo.c.

References boardString, embAppName, HOST_PRO_INT_DEV_TAG, and shieldString.

Referenced by main().

Here is the caller graph for this function:

Variable Documentation

◆ boardString

char boardString[ADS_MAX_STRING_LENGTH] = {0}

Definition at line 66 of file host_demo.c.

Referenced by main(), and process_host_command().

◆ embAppName

char embAppName[ADS_MAX_STRING_LENGTH] = {0}

Definition at line 67 of file host_demo.c.

Referenced by main(), and process_host_command().

◆ shieldString

char shieldString[ADS_MAX_STRING_LENGTH] = {0}

Definition at line 66 of file host_demo.c.

Referenced by main(), and process_host_command().