Proxy PLC Controller interface layer implementation.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include "compiler.h"
Macros | |
#define | PPLC_CLOCK 9000000 /* < PPLC clock setting */ |
#define | PPLC_CMD_AND 0x4c /* < AND operation */ |
#define | PPLC_CMD_OR 0x71 /* < OR operation */ |
#define | PPLC_CMD_READ 0x63 /* < Read operation */ |
#define | PPLC_CMD_WRITE 0x2a /* < Write operation */ |
#define | PPLC_CMD_WRITE_REP 0x1e /* < Repetitive write operation */ |
#define | PPLC_CMD_XOR 0x6d /* < XOR operation */ |
#define | PPLC_DLYBCT 0 /* < Delay between consecutive transfers */ |
#define | PPLC_DLYBS 10 /* < Delay before SPCK */ |
#define | PPLC_PRIO 11 /* < PPLC interruption group priority */ |
Functions | |
void | pplc_if_and8 (uint16_t us_addr, uint8_t uc_mask) |
Apply AND mask to 8 bits register. More... | |
void | pplc_if_init (void) |
Initialize PPLC interface. More... | |
void | pplc_if_or8 (uint16_t us_addr, uint8_t uc_mask) |
Apply OR mask to 8 bits register. More... | |
uint16_t | pplc_if_read16 (uint16_t us_addr) |
Read 16bits from PPLC. More... | |
uint32_t | pplc_if_read32 (uint16_t us_addr) |
Read 32bits from PPLC. More... | |
uint8_t | pplc_if_read8 (uint16_t us_addr) |
Read 8bits from PPLC. More... | |
uint8_t | pplc_if_read_buf (uint16_t us_addr, uint8_t *ptr_buf, uint16_t us_len) |
Write the content of buffer to PPLC. More... | |
uint8_t | pplc_if_write16 (uint16_t us_addr, uint16_t us_data) |
Write 16 bits to PPLC. More... | |
uint8_t | pplc_if_write32 (uint16_t us_addr, uint32_t ul_dat) |
Write 32 bits to PPLC. More... | |
uint8_t | pplc_if_write8 (uint16_t us_addr, uint8_t uc_dat) |
Write 8 bits to PPLC. More... | |
uint8_t | pplc_if_write_buf (uint16_t us_addr, uint8_t *ptr_buf, uint16_t us_len) |
Read bytes from PPLC. More... | |
uint8_t | pplc_if_write_rep (uint16_t us_addr, uint8_t uc_bytes_rep, uint8_t *ptr_buf, uint16_t us_len) |
Write 8 bits to PPLC repetitive at the same address. More... | |
void | pplc_if_xor8 (uint16_t us_addr, uint8_t uc_mask) |
Apply XOR mask to 8 bits register. More... | |
void | pplc_set_handler (void(*p_handler)(void)) |
Set an interrupt handler for the specified interrput source. More... | |