no-OS
mdio_bitbang.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef _MDIO_BITBANG_H_
40 #define _MDIO_BITBANG_H_
41 
42 #include "no_os_gpio.h"
43 
47 };
48 
49 extern struct no_os_mdio_ops mdio_bitbang_ops;
50 
51 #endif
NO_OS_MDIO_OP_READ
#define NO_OS_MDIO_OP_READ
Definition: no_os_mdio.h:52
NO_OS_MDIO_PHYADDR_MASK
#define NO_OS_MDIO_PHYADDR_MASK
Definition: no_os_mdio.h:54
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
no_os_mdio_init_param
Parameters for an MDIO slave.
Definition: no_os_mdio.h:66
no_os_mdio_desc::addr
uint8_t addr
Definition: no_os_mdio.h:87
mdio_bitbang_init_param
Definition: mdio_bitbang.h:44
mdio_bitbang_init_param::mdio
struct no_os_gpio_init_param mdio
Definition: mdio_bitbang.h:46
NO_OS_MDIO_C45_DEVADDR_MASK
#define NO_OS_MDIO_C45_DEVADDR_MASK
Definition: no_os_mdio.h:59
NO_OS_MDIO_TURNAROUND
#define NO_OS_MDIO_TURNAROUND
Definition: no_os_mdio.h:56
no_os_gpio_get_value
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:227
NO_OS_MDIO_OP_MASK
#define NO_OS_MDIO_OP_MASK
Definition: no_os_mdio.h:53
NO_OS_MDIO_REGADDR_MASK
#define NO_OS_MDIO_REGADDR_MASK
Definition: no_os_mdio.h:55
mdio_bitbang_write
int mdio_bitbang_write(struct no_os_mdio_desc *dev, uint32_t reg, uint16_t in)
Definition: mdio_bitbang.c:154
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
NO_OS_MDIO_TURNAROUND_MASK
#define NO_OS_MDIO_TURNAROUND_MASK
Definition: no_os_mdio.h:57
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:60
no_os_mdio_init_param::extra
void * extra
Definition: no_os_mdio.h:77
no_os_gpio_direction_input
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:130
mdio_bitbang_extra::mdio
struct no_os_gpio_desc * mdio
Definition: mdio_bitbang.c:49
NO_OS_MDIO_START_MASK
#define NO_OS_MDIO_START_MASK
Definition: no_os_mdio.h:49
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:121
mdio_bitbang_extra::mdc
struct no_os_gpio_desc * mdc
Definition: mdio_bitbang.c:48
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
no_os_mdio_desc::c45
bool c45
Definition: no_os_mdio.h:86
no_os_mdio.h
Header file for MDIO interface driver.
mdio_bitbang_extra
Definition: mdio_bitbang.c:47
no_os_mdio_ops::init
int(* init)(struct no_os_mdio_desc **, struct no_os_mdio_init_param *)
Definition: no_os_mdio.h:98
no_os_gpio_remove
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:110
mdio_bitbang_ops
struct no_os_mdio_ops mdio_bitbang_ops
Definition: mdio_bitbang.c:194
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
NO_OS_MDIO_OP_ADDRESS
#define NO_OS_MDIO_OP_ADDRESS
Definition: no_os_mdio.h:50
mdio_bitbang_remove
int mdio_bitbang_remove(struct no_os_mdio_desc *dev)
Definition: mdio_bitbang.c:182
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:55
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
NO_OS_MDIO_C22_START
#define NO_OS_MDIO_C22_START
Definition: no_os_mdio.h:48
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:75
no_os_mdio_desc
MDIO device descriptor created with no_os_mdio_init().
Definition: no_os_mdio.h:84
mdio_bitbang_read
int mdio_bitbang_read(struct no_os_mdio_desc *dev, uint32_t reg, uint16_t *out)
Definition: mdio_bitbang.c:168
NULL
#define NULL
Definition: wrapper.h:64
no_os_mdio_desc::extra
void * extra
Definition: no_os_mdio.h:89
mdio_bitbang.h
Header file for MDIO implementation using gpio bit banging.
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:203
mdio_bitbang_ops
struct no_os_mdio_ops mdio_bitbang_ops
Definition: mdio_bitbang.c:194
NO_OS_MDIO_OP_WRITE
#define NO_OS_MDIO_OP_WRITE
Definition: no_os_mdio.h:51
no_os_mdio_ops
Collection of MDIO ops that point to specific implementations.
Definition: no_os_mdio.h:96
no_os_gpio.h
Header file of GPIO Interface.
no_os_util.h
Header file of utility functions.
NO_OS_MDIO_C45_START
#define NO_OS_MDIO_C45_START
Definition: no_os_mdio.h:47
no_os_gpio_direction_output
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:153
mdio_bitbang_init_param::mdc
struct no_os_gpio_init_param mdc
Definition: mdio_bitbang.h:45
NO_OS_MDIO_C22_REGS
#define NO_OS_MDIO_C22_REGS
Definition: no_os_mdio.h:46
errno.h
Error macro definition for ARM Compiler.