gpio: update config to use only one gpio for ATX PSU
All checks were successful
Build ESP32 BMC Firmware / build (push) Successful in 59s
All checks were successful
Build ESP32 BMC Firmware / build (push) Successful in 59s
This commit is contained in:
22
main/main.c
22
main/main.c
@@ -17,12 +17,10 @@ static void eth_event_callback(eth_event_type_t event) {
|
||||
switch (event) {
|
||||
case ETH_EVENT_CONNECTED:
|
||||
ESP_LOGI(TAG, "Ethernet connected");
|
||||
gpio_set_status_led(true);
|
||||
break;
|
||||
|
||||
case ETH_EVENT_DISCONNECTED:
|
||||
ESP_LOGW(TAG, "Ethernet disconnected");
|
||||
gpio_set_status_led(false);
|
||||
break;
|
||||
|
||||
case ETH_EVENT_GOT_IP: {
|
||||
@@ -51,9 +49,6 @@ void app_main(void) {
|
||||
// Continue anyway - some GPIOs might still work
|
||||
}
|
||||
|
||||
// Set status LED to indicate initialization
|
||||
gpio_set_status_led(false);
|
||||
|
||||
// Initialize UART handler
|
||||
ESP_LOGI(TAG, "Initializing UART handler...");
|
||||
ret = uart_handler_init();
|
||||
@@ -119,20 +114,5 @@ void app_main(void) {
|
||||
ESP_LOGI(TAG, "Web interface: http://%s/", ip);
|
||||
ESP_LOGI(TAG, "========================================");
|
||||
|
||||
// Main loop - monitor system health
|
||||
while (1) {
|
||||
// Update status LED based on connection state
|
||||
if (ethernet_is_connected()) {
|
||||
gpio_set_status_led(true);
|
||||
} else {
|
||||
// Blink LED if not connected
|
||||
gpio_set_status_led(false);
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
gpio_set_status_led(true);
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
gpio_set_status_led(false);
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(5000));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user