run auto-formatter
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
uint32_t ethernetLinkTimer = 0;
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
void handle_status_change(struct netif* netif, bool link_up);
|
||||
void handle_status_change(struct netif *netif, bool link_up);
|
||||
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
/**
|
||||
@ -29,7 +29,7 @@ void handle_status_change(struct netif* netif, bool link_up);
|
||||
* @param netif: the network interface
|
||||
* @retval None
|
||||
*/
|
||||
void networking::ethernetLinkStatusUpdated(struct netif* netif) {
|
||||
void networking::ethernetLinkStatusUpdated(struct netif *netif) {
|
||||
if (netif_is_link_up(netif)) {
|
||||
networking::setEthCableConnected(true);
|
||||
handle_status_change(netif, true);
|
||||
@ -39,16 +39,16 @@ void networking::ethernetLinkStatusUpdated(struct netif* netif) {
|
||||
}
|
||||
}
|
||||
|
||||
void handle_status_change(struct netif* netif, bool link_up) {
|
||||
void handle_status_change(struct netif *netif, bool link_up) {
|
||||
if (link_up) {
|
||||
#if LWIP_DHCP
|
||||
/* Update DHCP state machine */
|
||||
set_dhcp_state(DHCP_START);
|
||||
#else
|
||||
uint8_t iptxt[20];
|
||||
sprintf((char*)iptxt, "%s", ip4addr_ntoa(netif_ip4_addr(netif)));
|
||||
printf("\rNetwork cable connected. Static IP address: %s | Port: %d\n\r", iptxt,
|
||||
UDP_SERVER_PORT);
|
||||
sprintf((char *)iptxt, "%s", ip4addr_ntoa(netif_ip4_addr(netif)));
|
||||
printf("\rNetwork cable connected. Static IP address: %s | Port: %d\n\r",
|
||||
iptxt, UDP_SERVER_PORT);
|
||||
#if OBSW_ETHERNET_USE_LED1_LED2 == 1
|
||||
BSP_LED_On(LED1);
|
||||
BSP_LED_Off(LED2);
|
||||
@ -75,7 +75,7 @@ void handle_status_change(struct netif* netif, bool link_up) {
|
||||
* @param netif
|
||||
* @retval None
|
||||
*/
|
||||
void networking::ethernetLinkPeriodicHandle(struct netif* netif) {
|
||||
void networking::ethernetLinkPeriodicHandle(struct netif *netif) {
|
||||
/* Ethernet Link every 100ms */
|
||||
if (HAL_GetTick() - ethernetLinkTimer >= 100) {
|
||||
ethernetLinkTimer = HAL_GetTick();
|
||||
|
Reference in New Issue
Block a user