Microchip® Advanced Software Framework

usi_user_protocol_template.c File Reference

Template of a user-defined protocol support for PLC USI service.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <compiler.h>
#include <asf.h>
#include "conf_example.h"

Variables

static bool b_led_swap = false
 

Response buffer

enum  serial_if_user_def_cmd_t {
  SERIAL_IF_USER_DEF_GET_CMD,
  SERIAL_IF_USER_DEF_GET_CMD_RSP,
  SERIAL_IF_USER_DEF_SET_CMD,
  SERIAL_IF_USER_DEF_SET_CMD_RSP,
  SERIAL_IF_USER_DEF_INVALID
}
 
static uint8_t uc_serial_rsp_buf [5]
 
static x_usi_serial_cmd_params_t x_phy_serial_msg
 
uint8_t serial_if_user_def_api_parser (uint8_t *puc_rx_msg, uint16_t us_len)
 Task to manage the serialization of the user defined protocol. More...
 
static void prvSetupHardware (void)
 Configure the hardware. More...
 
int main (void)
 Main code entry point. More...
 

Enumerator
SERIAL_IF_USER_DEF_GET_CMD 
SERIAL_IF_USER_DEF_GET_CMD_RSP 
SERIAL_IF_USER_DEF_SET_CMD 
SERIAL_IF_USER_DEF_SET_CMD_RSP 
SERIAL_IF_USER_DEF_INVALID 

static void prvSetupHardware ( void  )
static

Configure the hardware.

References board_init(), and sysclk_init().

Referenced by main().

bool b_led_swap = false
static

Referenced by main().

uint8_t uc_serial_rsp_buf[5]
static
x_usi_serial_cmd_params_t x_phy_serial_msg
static