Microchip® Advanced Software Framework

sniffer_if.h File Reference

ATPL230 Sniffer 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_sniffer_cmd_params
 

Macros

#define SNIFFER_ATPL230   0x01
 
#define SNIFFER_IF_PHY_COMMAND_ENABLE_PRIME_PLUS_ROBUST   3 /* Enable robust modes of PRIME */
 
#define SNIFFER_IF_PHY_COMMAND_MAC_CRC   1 /* ENABLE MAC on the ATPL230 */
 
#define SNIFFER_IF_PHY_COMMAND_MESSAGE   4 /* Inject message in PLC */
 
#define SNIFFER_IF_PHY_COMMAND_SET_CHANNEL   2 /* SET PLC channel (1 = CENELEC- A) */
 
#define SNIFFER_IF_PHY_MESSAGE_PRIME_1_3   0x20 /* PRIME_1_3 pdu received */
 
#define SNIFFER_IF_PHY_MESSAGE_PRIME_PLUS   0x21 /* PRIME_PLUS pdu received */
 
#define SNIFFER_VERSION   0x14
 
#define TASK_SNIFFER_IF_GET_RX_PRIO   (tskIDLE_PRIORITY + 1)
 
#define TASK_SNIFFER_IF_GET_RX_STACK   (configMINIMAL_STACK_SIZE * 1)
 
#define TIME_IN_TICS(x)   (x / 10)
 
#define TIME_OFDM_SYMBOL_US   2240L
 
#define TIME_PRIME_1_3_HEADER_US   4480L
 
#define TIME_PRIME_1_3_PREAMBLE_US   2048L
 
#define TIME_PRIME_PLUS_HEADER_US   (TIME_OFDM_SYMBOL_US * 4)
 
#define TIME_PRIME_PLUS_PREAMBLE_US   (TIME_PRIME_1_3_PREAMBLE_US * 4)
 

Functions

uint8_t serial_if_sniffer_api_parser (uint8_t *puc_rx_msg, uint16_t us_len)
 Received message. More...
 
void sniffer_if_init (uint8_t uc_enable_led)
 Initialize sniffer interface. More...
 
void sniffer_if_process (void)
 Task to manage the serialization of the reception message through USI. More...