Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
lan7800.c File Reference
#include "lan7800.h"
#include <usb_core_driver.h>
#include <stdio.h>
#include <clock.h>
#include <string.h>

Functions

usb_status_t lan7800_write_reg (struct usb_device *udev, uint32_t index, uint32_t data)
 
usb_status_t lan7800_read_reg (struct usb_device *udev, uint32_t index, uint32_t *data)
 
usb_status_t lan7800_modify_reg (struct usb_device *udev, uint32_t index, uint32_t mask, uint32_t set)
 
usb_status_t lan7800_set_reg_bits (struct usb_device *udev, uint32_t index, uint32_t set)
 
usb_status_t lan7800_set_mac_address (struct usb_device *udev, const uint8_t *macaddr)
 
usb_status_t lan7800_get_mac_address (struct usb_device *udev, uint8_t *macaddr)
 
usb_status_t lan7800_mdio_wait_for_bit (struct usb_device *udev, const uint32_t reg, const uint32_t mask, const bool set)
 
usb_status_t lan7800_phy_wait_not_busy (struct usb_device *udev)
 
usb_status_t lan7800_eeprom_confirm_not_busy (struct usb_device *udev)
 
usb_status_t lan7800_wait_eeprom (struct usb_device *udev)
 
usb_status_t lan7800_read_raw_eeprom (struct usb_device *udev, uint32_t offset, uint32_t length, uint8_t *data)
 
usb_status_t lan7800_set_rx_max_frame_length (struct usb_device *udev, int size)
 
usb_status_t lan7800_set_features (struct usb_device *udev, uint32_t set)
 
usb_status_t lan7800_init (struct usb_device *udev, uint8_t *macaddress)
 

Detailed Description

Authors
Rade Latinovich Patrick J. McGee

This file provides various functions needed by the Microchip LAN7800 USB Ethernet Driver, equipped on the Raspberry Pi 3 Model B+.

These functions are based on those of the LAN78XX drivers found in:

U-Boot (https://github.com/u-boot/u-boot/blob/af15946aa081dbcd0bec7d507a2b2db4e6b6cda5/drivers/usb/eth/lan78xx.c)

Embedded Xinu, Copyright (C) 2018. All rights reserved.