Adapted to Lora Semtech + Nucleo
Dependents: LoRaWAN-lmic-app LoRaWAN-lmic-app LoRaWAN-test-10secs LoRaPersonalizedDeviceForEverynet ... more
Fork of lwip_ppp_ethernet by
Various functions for controlling and monitoring the status of the DP83848 PHY. More...
Functions | |
static s32_t | lpc_update_phy_sts (struct netif *netif, u32_t linksts) |
Update PHY status from passed value. | |
err_t | lpc_phy_init (struct netif *netif) |
Initialize the DP83848 PHY. | |
s32_t | lpc_phy_sts_sm (struct netif *netif) |
Phy status update state machine. | |
Variables | |
static PHY_STATUS_TYPE | physts |
PHY update flags. | |
static PHY_STATUS_TYPE | olddphysts |
Last PHY update flags, used for determing if something has changed. | |
static s32_t | phyustate |
PHY update counter for state machine. |
Detailed Description
Various functions for controlling and monitoring the status of the DP83848 PHY.
In polled (standalone) systems, the PHY state must be monitored as part of the application. In a threaded (RTOS) system, the PHY state is monitored by the PHY handler thread. The MAC driver will not transmit unless the PHY link is active.
Function Documentation
err_t lpc_phy_init | ( | struct netif * | netif ) |
Initialize the DP83848 PHY.
Initialize the PHY.
This function initializes the DP83848 PHY. It will block until complete. This function is called as part of the EMAC driver initialization. Configuration of the PHY at startup is controlled by setting up configuration defines in lpc_phy.h.
- Parameters:
-
[in] netif NETIF structure
- Returns:
- ERR_OK if the setup was successful, otherwise ERR_TIMEOUT
Definition at line 192 of file lpc_phy_dp83848.c.
s32_t lpc_phy_sts_sm | ( | struct netif * | netif ) |
Phy status update state machine.
This function provides a state machine for maintaining the PHY status without blocking. It must be occasionally called for the PHY status to be maintained.
- Parameters:
-
[in] netif NETIF structure
Definition at line 242 of file lpc_phy_dp83848.c.
static s32_t lpc_update_phy_sts | ( | struct netif * | netif, |
u32_t | linksts | ||
) | [static] |
Update PHY status from passed value.
This function updates the current PHY status based on the passed PHY status word. The PHY status indicate if the link is active, the connection speed, and duplex.
- Parameters:
-
[in] netif NETIF structure [in] linksts Status word from PHY
- Returns:
- 1 if the status has changed, otherwise 0
Definition at line 119 of file lpc_phy_dp83848.c.
Variable Documentation
PHY_STATUS_TYPE olddphysts [static] |
Last PHY update flags, used for determing if something has changed.
Definition at line 104 of file lpc_phy_dp83848.c.
PHY_STATUS_TYPE physts [static] |
PHY update flags.
Definition at line 101 of file lpc_phy_dp83848.c.
s32_t phyustate [static] |
PHY update counter for state machine.
Definition at line 107 of file lpc_phy_dp83848.c.
Generated on Tue Jul 12 2022 15:12:17 by 1.7.2