40 #ifndef SDLOG_USB_VBUS_BOOT
41 #define SDLOG_USB_VBUS_BOOT false
66 (BaseBlockDevice *) &SDLOG_SDIO,
104 chRegSetThreadName(
"UsbStorage:polling");
105 event_listener_t connected;
107 #if SDLOG_USB_VBUS_BOOT
113 #if HAL_USE_SERIAL_USB
115 chBSemWait(&bs_start_msd);
121 chThdSleepMilliseconds(10);
129 chRegSetThreadName(
"UsbStorage:connected");
138 chThdExit(MSG_TIMEOUT);
146 chEvtWaitOne(EVENT_MASK(1));
153 chThdSleepMilliseconds(10);
158 chThdSleepMilliseconds(500);
173 chBSemSignal(&bs_start_msd);
#define SDLOG_USB_VBUS_PIN
#define SDLOG_USB_VBUS_PORT
void mcu_reboot(enum reboot_state_t reboot_state)
Reboot the MCU.
@ MCU_REBOOT_FAST
Fast reboot (skip bootloader)
arch independent LED (Light Emitting Diodes) API
void pprz_terminate_autopilot_threads(void)
Terminate all autopilot threads Wait until proper stop.
Arch independent mcu ( Micro Controller Unit ) utilities.
arch independent SDIO API
bool sdio_connect(SDCDriver *sdc)
Connect a SD card on SDIO peripheral.
void sdlog_chibios_finish(const bool flush)
Driver configuration structure.
static void thdUsbStorage(void *arg)
void usbStorageStartPolling(void)
static thread_t * usbStorageThreadPtr
static USBMassStorageConfig msdConfig
static THD_WORKING_AREA(waThdUsbStorage, 4096)
void usbStorageWaitForDeconnexion(void)
bool usbStorageIsItRunning(void)
static void usbActivity(bool active)
void usbStorage_enable_usb_storage(float e)
static BSEMAPHORE_DECL(bs_start_msd, true)
void usbStorageStop(void)
void init_msd_driver(void *dbgThreadPtr, USBMassStorageConfig *msdConfig)
void msd_register_evt_connected(event_listener_t *elp, eventmask_t mask)
register connected event source in local event mask
void deinit_msd_driver(void)