no-OS
net.h
Go to the documentation of this file.
1 #include "iio_adin1300.h"
2 #include "iio_max24287.h"
3 #include "mwc.h"
4 
5 int net_init(struct adin1300_iio_desc **adin1300_iio,
6  struct max24287_iio_desc **max24287_iio,
7  unsigned int speed);
net_context
Definition: net.c:15
ADIN1300_LNK_STAT_CHNG_IRQ_MASK
#define ADIN1300_LNK_STAT_CHNG_IRQ_MASK
Definition: adin1300.h:54
adin1300_iio_init_param
Definition: iio_adin1300.h:12
MAX24287_AN_RX
#define MAX24287_AN_RX
Definition: max24287.h:29
MAX24287_AN_EXP
#define MAX24287_AN_EXP
Definition: max24287.h:31
iio_adin1300.h
max24287_iio_desc
Definition: iio_max24287.h:7
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
ADIN1300_10_BASE_T_FULLDUPLEX
@ ADIN1300_10_BASE_T_FULLDUPLEX
Definition: adin1300.h:115
mdio_bitbang_init_param
Definition: mdio_bitbang.h:38
no_os_irq.h
Header file of IRQ interface.
no_os_irq_register_callback
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:92
ADIN1300_IRQ_MASK
#define ADIN1300_IRQ_MASK
Definition: adin1300.h:52
rj45_led
rj45_led
Definition: led.h:4
MAX24287_SGMII
@ MAX24287_SGMII
Definition: max24287.h:85
max24287_iio_desc::dev
struct max24287_desc * dev
Definition: iio_max24287.h:8
MAX24287_PAGE_IE
#define MAX24287_PAGE_IE
Definition: max24287.h:52
adin1300_int
void adin1300_int(void *context)
Definition: net.c:23
no_os_delay.h
Header file of Delay functions.
adin1300_write
int adin1300_write(struct adin1300_desc *dev, uint32_t addr, uint16_t val)
Definition: adin1300.c:120
max24287_write
int max24287_write(struct max24287_desc *dev, uint8_t addr, uint16_t val)
Definition: max24287.c:112
max24287_config_serial
int max24287_config_serial(struct max24287_desc *dev, enum max24287_serial ser, enum max24287_speed speed)
Definition: max24287.c:200
rj45_led_off
@ rj45_led_off
Definition: led.h:5
MAX24287_1000_FULLDUPLEX
@ MAX24287_1000_FULLDUPLEX
Definition: max24287.h:95
adin1300_resolved_speed
enum adin1300_speed adin1300_resolved_speed(struct adin1300_desc *dev)
Definition: adin1300.c:258
ADIN1300_GE_B10_REGEN_PRE_MSK
#define ADIN1300_GE_B10_REGEN_PRE_MSK
Definition: adin1300.h:111
max24287_speed
max24287_speed
Definition: max24287.h:89
adin1300_init_param
Definition: adin1300.h:146
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:124
NO_OS_IRQ_EDGE_FALLING
@ NO_OS_IRQ_EDGE_FALLING
Definition: no_os_irq.h:79
ADIN1300_1000_BASE_T_FULLDUPLEX
@ ADIN1300_1000_BASE_T_FULLDUPLEX
Definition: adin1300.h:119
adin1300_autoneg
int adin1300_autoneg(struct adin1300_desc *dev, bool on)
Definition: adin1300.c:239
adin1300_init
int adin1300_init(struct adin1300_desc **dev, struct adin1300_init_param *param)
Definition: adin1300.c:9
ADIN1300_IRQ_STATUS
#define ADIN1300_IRQ_STATUS
Definition: adin1300.h:53
no_os_irq_set_priority
int32_t no_os_irq_set_priority(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, uint32_t priority_level)
Set the priority for an interrupt.
Definition: no_os_irq.c:216
ADIN1300_GP_CLK_RECOVERED
@ ADIN1300_GP_CLK_RECOVERED
Definition: adin1300.h:127
max24287_read
int max24287_read(struct max24287_desc *dev, uint8_t addr, uint16_t *val)
Definition: max24287.c:129
MAX24287_GPIOCR1
#define MAX24287_GPIOCR1
Definition: max24287.h:56
MAX24287_RGMII
@ MAX24287_RGMII
Definition: max24287.h:80
no_os_callback_desc::ctx
void * ctx
Definition: no_os_irq.h:146
adin1300_read
int adin1300_read(struct adin1300_desc *dev, uint32_t addr, uint16_t *val)
Definition: adin1300.c:126
max_irq_ops
const struct no_os_irq_platform_ops max_irq_ops
maxim specific IRQ platform ops structure
Definition: maxim_irq.c:657
no_os_irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:109
no_os_mdio.h
Header file for MDIO interface driver.
no_os_irq_init_param::platform_ops
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:111
max24287_init_param
Definition: max24287.h:100
net_context::nvic
struct no_os_irq_ctrl_desc * nvic
Definition: net.c:18
MAX24287_AN_EN_MASK
#define MAX24287_AN_EN_MASK
Definition: max24287.h:14
mdio_bitbang_ops
struct no_os_mdio_ops mdio_bitbang_ops
Definition: mdio_bitbang.c:188
no_os_irq_ctrl_init
int32_t no_os_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: no_os_irq.c:45
MAX24287_AN_START_MASK
#define MAX24287_AN_START_MASK
Definition: max24287.h:15
MAX24287_AN_ADV
#define MAX24287_AN_ADV
Definition: max24287.h:23
mwc.h
ADIN1300_100_BASE_TX_FULLDUPLEX
@ ADIN1300_100_BASE_TX_FULLDUPLEX
Definition: adin1300.h:117
max24287_init
int max24287_init(struct max24287_desc **dev, struct max24287_init_param *param)
Definition: max24287.c:9
max24287_init_param::reset_param
struct no_os_gpio_init_param * reset_param
Definition: max24287.h:101
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:144
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
max24287_desc
Definition: max24287.h:109
led.h
adin1300_desc
Definition: adin1300.h:157
net_context::max24287
struct max24287_desc * max24287
Definition: net.c:17
MAX24287_IR
#define MAX24287_IR
Definition: max24287.h:51
max24287_iio_init_param
Definition: iio_max24287.h:12
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:49
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
ADIN1300_GE_B10_REGEN_PRE
#define ADIN1300_GE_B10_REGEN_PRE
Definition: adin1300.h:110
MAX24287_BMCR
#define MAX24287_BMCR
Definition: max24287.h:12
adin1300_iio_init
int32_t adin1300_iio_init(struct adin1300_iio_desc **iiodev, struct adin1300_iio_init_param *init_param)
Definition: iio_adin1300.c:145
max24287_config_parallel
int max24287_config_parallel(struct max24287_desc *dev, enum max24287_parallel par, enum max24287_speed speed)
Definition: max24287.c:162
led_rj45
void led_rj45(enum rj45_led state)
NULL
#define NULL
Definition: wrapper.h:64
mdio_bitbang.h
Header file for MDIO implementation using gpio bit banging.
NO_OS_EVT_GPIO
@ NO_OS_EVT_GPIO
Definition: no_os_irq.h:62
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
max24287_write_bits
int max24287_write_bits(struct max24287_desc *dev, uint8_t addr, uint16_t val, uint16_t bitmask)
Definition: max24287.c:146
net_init
int net_init(struct adin1300_iio_desc **adin1300_iio, struct max24287_iio_desc **max24287_iio, unsigned int speed)
Definition: net.c:90
MAX24287_AN_RX_PAGE
#define MAX24287_AN_RX_PAGE
Definition: max24287.h:32
ADIN1300_HW_IRQ_EN_MASK
#define ADIN1300_HW_IRQ_EN_MASK
Definition: adin1300.h:56
adin1300_init_param::reset_param
struct no_os_gpio_init_param * reset_param
Definition: adin1300.h:147
adin1300_iio_desc::dev
struct adin1300_desc * dev
Definition: iio_adin1300.h:8
max24287_iio_init
int32_t max24287_iio_init(struct max24287_iio_desc **iiodev, struct max24287_iio_init_param *init_param)
Definition: iio_max24287.c:131
no_os_irq_enable
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:181
selfchange
volatile bool selfchange
Definition: net.c:21
net_init
int net_init(struct adin1300_iio_desc **adin1300_iio, struct max24287_iio_desc **max24287_iio, unsigned int speed)
Definition: net.c:90
no_os_gpio.h
Header file of GPIO Interface.
NO_OS_GPIO_IRQ
@ NO_OS_GPIO_IRQ
Definition: no_os_irq.h:85
adin1300.h
adin1300_config_speed
int adin1300_config_speed(struct adin1300_desc *dev, enum adin1300_speed speed_cap)
Definition: adin1300.c:194
adin1300_iio_desc
Definition: iio_adin1300.h:7
net.h
max24287.h
no_os_irq_trigger_level_set
int32_t no_os_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set interrupt trigger level.
Definition: no_os_irq.c:162
no_os_irq_disable
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:198
MAX24287_DPLX_MASK
#define MAX24287_DPLX_MASK
Definition: max24287.h:26
max24287_int
void max24287_int(void *context)
Definition: net.c:60
adin1300_speed
adin1300_speed
Definition: adin1300.h:113
no_os_irq_ctrl_desc
Definition: no_os_irq.h:123
max_gpio_irq_ops
const struct no_os_irq_platform_ops max_gpio_irq_ops
maxim platform specific gpio irq platform ops structure
Definition: maxim_gpio_irq.c:375
MAX24287_SPD_MASK
#define MAX24287_SPD_MASK
Definition: max24287.h:27
iio_max24287.h
net_context::adin1300
struct adin1300_desc * adin1300
Definition: net.c:16