Go to the documentation of this file.
39 #ifndef _MDIO_BITBANG_H_
40 #define _MDIO_BITBANG_H_
#define NO_OS_MDIO_OP_READ
Definition: no_os_mdio.h:52
#define NO_OS_MDIO_PHYADDR_MASK
Definition: no_os_mdio.h:54
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
Parameters for an MDIO slave.
Definition: no_os_mdio.h:66
uint8_t addr
Definition: no_os_mdio.h:87
Definition: mdio_bitbang.h:44
struct no_os_gpio_init_param mdio
Definition: mdio_bitbang.h:46
#define NO_OS_MDIO_C45_DEVADDR_MASK
Definition: no_os_mdio.h:59
#define NO_OS_MDIO_TURNAROUND
Definition: no_os_mdio.h:56
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
#define NO_OS_MDIO_OP_MASK
Definition: no_os_mdio.h:53
#define NO_OS_MDIO_REGADDR_MASK
Definition: no_os_mdio.h:55
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
Definition: no_os_gpio.h:123
#define NO_OS_MDIO_TURNAROUND_MASK
Definition: no_os_mdio.h:57
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
void * extra
Definition: no_os_mdio.h:77
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
#define NO_OS_MDIO_START_MASK
Definition: no_os_mdio.h:49
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:121
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
bool c45
Definition: no_os_mdio.h:86
Header file for MDIO interface driver.
int(* init)(struct no_os_mdio_desc **, struct no_os_mdio_init_param *)
Definition: no_os_mdio.h:98
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
struct no_os_mdio_ops mdio_bitbang_ops
Definition: mdio_bitbang.c:194
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
#define NO_OS_MDIO_OP_ADDRESS
Definition: no_os_mdio.h:50
int mdio_bitbang_remove(struct no_os_mdio_desc *dev)
Definition: mdio_bitbang.c:182
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
int mdio_bitbang_init(struct no_os_mdio_desc **dev, struct no_os_mdio_init_param *ip)
Definition: mdio_bitbang.c:52
#define NO_OS_MDIO_C22_START
Definition: no_os_mdio.h:48
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
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
MDIO device descriptor created with no_os_mdio_init().
Definition: no_os_mdio.h:84
int mdio_bitbang_read(struct no_os_mdio_desc *dev, uint32_t reg, uint16_t *out)
Definition: mdio_bitbang.c:168
#define NULL
Definition: wrapper.h:64
void * extra
Definition: no_os_mdio.h:89
Header file for MDIO implementation using gpio bit banging.
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
struct no_os_mdio_ops mdio_bitbang_ops
Definition: mdio_bitbang.c:194
#define NO_OS_MDIO_OP_WRITE
Definition: no_os_mdio.h:51
Collection of MDIO ops that point to specific implementations.
Definition: no_os_mdio.h:96
Header file of GPIO Interface.
Header file of utility functions.
#define NO_OS_MDIO_C45_START
Definition: no_os_mdio.h:47
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
struct no_os_gpio_init_param mdc
Definition: mdio_bitbang.h:45
#define NO_OS_MDIO_C22_REGS
Definition: no_os_mdio.h:46
Error macro definition for ARM Compiler.