ATPL230 Physical layer.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdio.h>
#include <string.h>
#include "atpl230.h"
#include "atpl230_reg.h"
#include "atpl230_version.h"
#include "atpl230_iir_filter.h"
#include "conf_atpl230.h"
#include "conf_phy.h"
#include "asf.h"
Functions | |
static uint32_t | _get_crc (uint8_t uc_crc_type, uint8_t *puc_buf, uint16_t us_len, uint8_t uc_header_type) |
Get CRC value from the buffer content. More... | |
static void | _init_IIR_filter (void) |
Filter IIR initialization. More... | |
static void | _init_phy_layer (uint8_t uc_rst_type) |
PHY init layer. More... | |
static void | _phy_rx_task (void) |
Task to process RX PLC. More... | |
static void | _phy_tx_result_task (void) |
Task to process TX PLC. More... | |
static void | _reset_rx_flag_interrupt (uint8_t uc_buf_idx) |
Reset reception interrupt. More... | |
static void | _store_filter_sec (uint8_t *puc_fir_data, uint8_t uc_cmd, uint8_t uc_num_rows, uint8_t uc_way_mode, uint8_t uc_start_mem_byte, uint8_t uc_inv_mode) |
Store Filter secuence. More... | |
static void | _upd_sna_crc (uint8_t *puc_sna) |
Update CRC of SNA. More... | |
static uint8_t | _update_channel (uint8_t uc_channel) |
Update channel in atpl230 device. More... | |
static void | _update_emit1_mode (uint8_t uc_emode) |
Update emit 1 mode in atpl230 device. More... | |
static void | _update_emit2_mode (uint8_t uc_emode) |
Update emit 2 mode in atpl230 device. More... | |
static void | _update_txrx1_polarity (uint8_t uc_pol) |
Update polarity of TXRX 1 in atpl230 device. More... | |
static void | _update_txrx2_polarity (uint8_t uc_pol) |
Update polarity of TXRX 2 in atpl230 device. More... | |
void | Dummy_serial_if_init (void) |
Dummy Phy Tester Tool Serialization Addon. More... | |
void | Dummy_sniffer_if_init (uint8_t uc_enable_led) |
Dummy Phy Sniffer Serialization Addon. More... | |
void | phy_handler (void) |
PHY interrupt management. More... | |
void | serial_if_init (void))) |
void | sniffer_if_init (uint8_t uc_enable_led))) |
Initialize sniffer interface. More... | |
ATPL230 Physical Layer Interface | |
void | phy_tx_frame_result_cb (xPhyMsgTxResult_t *px_tx_result) |
Task to process TX PLC. More... | |
uint8_t | phy_get_cfg_param (uint16_t us_id, void *p_val, uint16_t uc_len) |
Get PHY layer parameter. More... | |
uint8_t | phy_set_cfg_param (uint16_t us_id, void *p_val, uint16_t uc_len) |
Set PHY layer parameter. More... | |
uint8_t | phy_cmd_cfg_param (uint16_t us_id, uint8_t uc_cmd, uint8_t uc_mask) |
Set PHY layer parameter. More... | |
uint8_t | phy_tx_frame (xPhyMsgTx_t *px_msg) |
Write the transmitted data with ATPL230 device. More... | |
void | phy_rx_frame_cb (xPhyMsgRx_t *px_msg) |
Read the received data with ATPL230 device. More... | |
void | phy_init (uint8_t uc_ifaceEnable) |
Create PHY tasks, queues and semaphores Initialize physical parameters and configure ATPL230 device. More... | |
void | phy_reset (uint8_t uc_reset_type) |
Reset PHY layer including pplc service and serial ifaces Initialize physical parameters and configure ATPL230 device. More... | |