KS8851SNL driver for SAM0.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
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 |
|
inlinestatic |
Perform hardware reset of the PHY.
References delay_ms, and port_pin_set_output_level().
Referenced by ksz8851snl_init().
|
static |
Initialize the hardware interface.
References spi_master_config::baudrate, port_config::direction, ksz8851snl_master, ksz8851snl_slave, spi_config::master, spi_config::mode_specific, spi_config::mux_setting, spi_config::pinmux_pad0, spi_config::pinmux_pad1, spi_config::pinmux_pad2, spi_config::pinmux_pad3, port_get_config_defaults(), PORT_PIN_DIR_OUTPUT, port_pin_set_config(), spi_attach_slave(), spi_enable(), spi_get_config_defaults(), spi_init(), spi_slave_inst_get_config_defaults(), and spi_slave_inst_config::ss_pin.
Referenced by ksz8851snl_init().