16 #include "clock_config.h" 20 #include "Driver_USART.h" 23 #include "issdk_hal.h" 24 #include "gpio_driver.h" 27 #include "auto_detection_service.h" 33 #define APPLICATION_NAME "HOST_DEMO" 35 #define APPLICATION_VERSION "1.0" 48 uint8_t tag, uint8_t *hostCommand, uint8_t *hostResponse,
size_t *hostMsgSize,
size_t respBufferSize)
63 if (respBufferSize >= boardNameLen + shieldNameLen + appNameLen + 3)
72 hostResponse[*hostMsgSize] = appNameLen;
75 memcpy(hostResponse + *hostMsgSize,
embAppName, appNameLen);
76 *hostMsgSize += appNameLen;
78 hostResponse[*hostMsgSize] = boardNameLen;
81 memcpy(hostResponse + *hostMsgSize,
boardString, boardNameLen);
82 *hostMsgSize += boardNameLen;
84 hostResponse[*hostMsgSize] = shieldNameLen;
87 memcpy(hostResponse + *hostMsgSize,
shieldString, shieldNameLen);
88 *hostMsgSize += shieldNameLen;
102 uint8_t bannerLength, bannerString[256];
121 bannerLength = sprintf((
char *)bannerString,
122 "\r\n Application Name [%s] \r\n Board Name [%s] \r\n Shield Name [%s] \r\n",
129 if (ARM_DRIVER_OK != status)
135 status = pUartDriver->PowerControl(ARM_POWER_FULL);
136 if (ARM_DRIVER_OK != status)
143 if (ARM_DRIVER_OK != status)
uint8_t Host_IO_Init(ARM_DRIVER_USART *pDrv, void *pBus, void *pDevInfo, void *spiSlaveParams, uint16_t slaveAddress)
void Host_IO_Receive(host_cmd_proc_fn_t process_host_command, uint8_t encoding)
The host_io_uart.h file contains the Host Protocol interface definitions and configuration.
bool process_host_command(uint8_t tag, uint8_t *hostCommand, uint8_t *hostResponse, size_t *hostMsgSize, size_t respBufferSize)
#define APPLICATION_NAME
Unique Name for this application which should match the target GUI pkg name.
Access structure of the GPIO Driver.
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream.
#define HOST_S_SIGNAL_EVENT
char shieldString[ADS_MAX_STRING_LENGTH]
#define BOARD_DEBUG_UART_BAUDRATE
#define BOARD_BootClockRUN
GENERIC_DRIVER_GPIO Driver_GPIO_KSDK
void Host_IO_Send(uint8_t *pMsg, size_t size, uint8_t encoding)
GENERIC_DRIVER_GPIO * pGpioDriver
char boardString[ADS_MAX_STRING_LENGTH]
#define HOST_PRO_INT_DEV_TAG
void BOARD_RunADS(const char *appName, char *boardString, char *shieldString, size_t bufferLength)
The function to register Application Name and initialte ADS.
char embAppName[ADS_MAX_STRING_LENGTH]
void(* toggle_pin)(pinID_t aPinId)
#define ADS_MAX_STRING_LENGTH
#define APPLICATION_VERSION
Version to distinguish between instances the same application based on target Shield and updates...
int main(void)
Main function.
void BOARD_SystickEnable(void)
Function to enable systicks framework.
status_t SMC_SetPowerModeWait(void *arg)
Configures the system to WAIT power mode. API name used from Kinetis family to maintain compatibility...
void(* pin_init)(pinID_t aPinId, gpio_direction_t dir, void *apPinConfig, gpio_isr_handler_t aIsrHandler, void *apUserData)
gpioHandleKSDK_t GREEN_LED