no-OS
Classes | Functions | Variables
mdio_bitbang.c File Reference

Source file for MDIO implementation using gpio bit banging. More...

#include <errno.h>
#include <stdlib.h>
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "no_os_gpio.h"
#include "no_os_mdio.h"
#include "mdio_bitbang.h"
Include dependency graph for mdio_bitbang.c:

Classes

struct  mdio_bitbang_extra
 

Functions

int mdio_bitbang_init (struct no_os_mdio_desc **dev, struct no_os_mdio_init_param *ip)
 
int mdio_bitbang_write (struct no_os_mdio_desc *dev, uint32_t reg, uint16_t in)
 
int mdio_bitbang_read (struct no_os_mdio_desc *dev, uint32_t reg, uint16_t *out)
 
int mdio_bitbang_remove (struct no_os_mdio_desc *dev)
 

Variables

struct no_os_mdio_ops mdio_bitbang_ops
 

Detailed Description

Source file for MDIO implementation using gpio bit banging.

Author
Darius Berghe (dariu.nosp@m.s.be.nosp@m.rghe@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2023(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ mdio_bitbang_init()

int mdio_bitbang_init ( struct no_os_mdio_desc **  dev,
struct no_os_mdio_init_param ip 
)

◆ mdio_bitbang_read()

int mdio_bitbang_read ( struct no_os_mdio_desc dev,
uint32_t  reg,
uint16_t *  out 
)

◆ mdio_bitbang_remove()

int mdio_bitbang_remove ( struct no_os_mdio_desc dev)

◆ mdio_bitbang_write()

int mdio_bitbang_write ( struct no_os_mdio_desc dev,
uint32_t  reg,
uint16_t  in 
)

Variable Documentation

◆ mdio_bitbang_ops

struct no_os_mdio_ops mdio_bitbang_ops
Initial value:
= {
}
mdio_bitbang_write
int mdio_bitbang_write(struct no_os_mdio_desc *dev, uint32_t reg, uint16_t in)
Definition: mdio_bitbang.c:154
mdio_bitbang_remove
int mdio_bitbang_remove(struct no_os_mdio_desc *dev)
Definition: mdio_bitbang.c:182
mdio_bitbang_init
int mdio_bitbang_init(struct no_os_mdio_desc **dev, struct no_os_mdio_init_param *ip)
Definition: mdio_bitbang.c:52
mdio_bitbang_read
int mdio_bitbang_read(struct no_os_mdio_desc *dev, uint32_t reg, uint16_t *out)
Definition: mdio_bitbang.c:168