Go to the documentation of this file.
33 #ifndef _MDIO_BITBANG_H_
34 #define _MDIO_BITBANG_H_
#define NO_OS_MDIO_OP_READ
Definition: no_os_mdio.h:46
#define NO_OS_MDIO_PHYADDR_MASK
Definition: no_os_mdio.h:48
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
Parameters for an MDIO slave.
Definition: no_os_mdio.h:60
uint8_t addr
Definition: no_os_mdio.h:81
Definition: mdio_bitbang.h:38
struct no_os_gpio_init_param mdio
Definition: mdio_bitbang.h:40
#define NO_OS_MDIO_C45_DEVADDR_MASK
Definition: no_os_mdio.h:53
#define NO_OS_MDIO_TURNAROUND
Definition: no_os_mdio.h:50
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:221
#define NO_OS_MDIO_OP_MASK
Definition: no_os_mdio.h:47
#define NO_OS_MDIO_REGADDR_MASK
Definition: no_os_mdio.h:49
int mdio_bitbang_write(struct no_os_mdio_desc *dev, uint32_t reg, uint16_t in)
Definition: mdio_bitbang.c:148
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
#define NO_OS_MDIO_TURNAROUND_MASK
Definition: no_os_mdio.h:51
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:54
void * extra
Definition: no_os_mdio.h:71
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:124
#define NO_OS_MDIO_START_MASK
Definition: no_os_mdio.h:43
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
bool c45
Definition: no_os_mdio.h:80
Header file for MDIO interface driver.
int(* init)(struct no_os_mdio_desc **, struct no_os_mdio_init_param *)
Definition: no_os_mdio.h:92
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:104
struct no_os_mdio_ops mdio_bitbang_ops
Definition: mdio_bitbang.c:188
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
#define NO_OS_MDIO_OP_ADDRESS
Definition: no_os_mdio.h:44
int mdio_bitbang_remove(struct no_os_mdio_desc *dev)
Definition: mdio_bitbang.c:176
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:49
int mdio_bitbang_init(struct no_os_mdio_desc **dev, struct no_os_mdio_init_param *ip)
Definition: mdio_bitbang.c:46
#define NO_OS_MDIO_C22_START
Definition: no_os_mdio.h:42
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:69
MDIO device descriptor created with no_os_mdio_init().
Definition: no_os_mdio.h:78
int mdio_bitbang_read(struct no_os_mdio_desc *dev, uint32_t reg, uint16_t *out)
Definition: mdio_bitbang.c:162
#define NULL
Definition: wrapper.h:64
void * extra
Definition: no_os_mdio.h:83
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:197
struct no_os_mdio_ops mdio_bitbang_ops
Definition: mdio_bitbang.c:188
#define NO_OS_MDIO_OP_WRITE
Definition: no_os_mdio.h:45
Collection of MDIO ops that point to specific implementations.
Definition: no_os_mdio.h:90
Header file of GPIO Interface.
Header file of utility functions.
#define NO_OS_MDIO_C45_START
Definition: no_os_mdio.h:41
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:147
struct no_os_gpio_init_param mdc
Definition: mdio_bitbang.h:39
#define NO_OS_MDIO_C22_REGS
Definition: no_os_mdio.h:40
Error macro definition for ARM Compiler.