Microchip® Advanced Software Framework

serial_if.h File Reference

ATPL230 Serial Interface for Physical layer.

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

#include "conf_atpl230.h"
#include "conf_phy.h"

Data Structures

struct  x_usi_serial_cmd_params
 

Macros

#define IFACE_SERIAL_ENABLE   0x1
 
#define IFACE_SNIFFER_ENABLE   0x2
 
#define SERIAL_IF_PHY_COMMAND_CMD_CFG   4 /* Get reception configuration query */
 
#define SERIAL_IF_PHY_COMMAND_CMD_CFG_RSP   5 /* Get reception configuration response */
 
#define SERIAL_IF_PHY_COMMAND_GET_CFG   0 /* Get reception configuration query */
 
#define SERIAL_IF_PHY_COMMAND_GET_CFG_LIST   11 /* Get parameter list */
 
#define SERIAL_IF_PHY_COMMAND_GET_CFG_LIST_RSP   12 /* Parameter list response */
 
#define SERIAL_IF_PHY_COMMAND_GET_CFG_RSP   1 /* Get reception configuration response */
 
#define SERIAL_IF_PHY_COMMAND_NOISE_REQ   9 /* Set noise capture mode */
 
#define SERIAL_IF_PHY_COMMAND_NOISE_RSP   10 /* Get noise capture */
 
#define SERIAL_IF_PHY_COMMAND_RECEIVE_MSG   8 /* Receive message data */
 
#define SERIAL_IF_PHY_COMMAND_RESET_PHY_LAYER   13 /* Reset phy layer */
 
#define SERIAL_IF_PHY_COMMAND_SEND_MSG   6 /* Send message data */
 
#define SERIAL_IF_PHY_COMMAND_SEND_MSG_RSP   7 /* Send message data response */
 
#define SERIAL_IF_PHY_COMMAND_SET_CFG   2 /* Set reception configuration command */
 
#define SERIAL_IF_PHY_COMMAND_SET_CFG_RSP   3 /* Set reception configuration response */
 
#define TASK_SERIAL_IF_GET_RX_PRIO   (tskIDLE_PRIORITY + 1)
 
#define TASK_SERIAL_IF_GET_RX_STACK   (configMINIMAL_STACK_SIZE * 1)
 
#define TASK_SERIAL_IF_GET_TX_RESULT_PRIO   (tskIDLE_PRIORITY + 1)
 
#define TASK_SERIAL_IF_GET_TX_RESULT_STACK   (configMINIMAL_STACK_SIZE * 1)
 

Functions

uint8_t serial_if_api_parser (uint8_t *puc_rx_msg, uint16_t us_len)
 Received message. More...
 
void serial_if_check_rx_msg (void)
 Interface to manage the serialization of the reception message through USI. More...
 
void serial_if_check_tx_result (void)
 Interface to manage the serialization of the reception message through USI. More...
 
void serial_if_init (void)
 Initialize serial interface. More...