Files
CherryUSB/tests/espressif/host/main/main.c
sakumisu 0c220ea127 chore: add build ci
Signed-off-by: sakumisu <1203593632@qq.com>
2025-11-03 21:21:26 +08:00

34 lines
798 B
C

/*
* SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*/
#include <stdio.h>
#include <inttypes.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_netif.h"
#include "esp_event.h"
#include "esp_log.h"
#include "usbd_core.h"
#include "usbh_core.h"
#include "demo/usb_host.c"
void app_main(void)
{
USB_LOG_INFO("Hello CherryUSB!\n");
// Initialize TCP/IP network interface aka the esp-netif (should be called only once in application)
ESP_ERROR_CHECK(esp_netif_init());
// Create default event loop that running in background
ESP_ERROR_CHECK(esp_event_loop_create_default());
usbh_initialize(0, 0x60080000, NULL);
while(1)
{
vTaskDelay(10);
}
}