Microchip® Advanced Software Framework

ksz8851snl.c File Reference

KS8851SNL driver for SAM0.

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

#include "ksz8851snl.h"
#include "ksz8851snl_reg.h"
#include "extint.h"

Functions

void configure_intn (void(*p_handler)(void))
 Configure the INTN interrupt. More...
 
void ksz8851_fifo_read (uint8_t *buf, uint32_t len)
 Read internal fifo buffer. More...
 
void ksz8851_fifo_write (uint8_t *buf, uint32_t len)
 Write internal fifo buffer. More...
 
void ksz8851_fifo_write_begin (uint32_t tot_len)
 Start to write internal fifo buffer. More...
 
void ksz8851_fifo_write_end (uint32_t pad)
 Complete write operation. More...
 
void ksz8851_reg_clrbits (uint16_t reg, uint16_t bits_to_clr)
 Read register content, clear bitmask and write back to register. More...
 
uint16_t ksz8851_reg_read (uint16_t reg)
 Read a register value. More...
 
void ksz8851_reg_setbits (uint16_t reg, uint16_t bits_to_set)
 Read register content, set bitmask and write back to register. More...
 
void ksz8851_reg_write (uint16_t reg, uint16_t wrdata)
 Write a register value. More...
 
static void ksz8851snl_hard_reset (void)
 Perform hardware reset of the PHY. More...
 
uint32_t ksz8851snl_init (void)
 Initialize the PHY controller. More...
 
static void ksz8851snl_interface_init (void)
 Initialize the hardware interface. More...
 

Variables

struct spi_module ksz8851snl_master
 
struct spi_slave_inst ksz8851snl_slave
 

static void ksz8851snl_hard_reset ( void  )
inlinestatic

Perform hardware reset of the PHY.

References delay_ms, and port_pin_set_output_level().

Referenced by ksz8851snl_init().