Main functions for USB host mass storage and mouse composite example.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | MSG_TEST "Test UHI MSC\n" |
Functions | |
int | main (void) |
Main function. Execution starts here. More... | |
void | main_usb_connection_event (uhc_device_t *dev, bool b_present) |
Notify that a USB device has been connected or disconnected. More... | |
void | main_usb_sof_event (void) |
Notify that a SOF has been sent (each 1 ms) More... | |
Variables | |
static volatile uint8_t | lun_state = 0 |
static volatile uint16_t | main_usb_sof_counter = 0 |
int main | ( | void | ) |
Main function. Execution starts here.
References board_init(), cpu_irq_enable, file_close(), file_open(), file_write_buf(), FOPEN_MODE_APPEND, FS_ERR_FILE_EXIST, FS_ERR_HW_NO_PRESENT, fs_g_status, FS_LUN_WP, irq_initialize_vectors, lun_state, main_usb_sof_counter, MSG_TEST, nav_drive_set(), nav_file_create(), nav_partition_mount(), nav_reset(), sleepmgr_enter_sleep(), sleepmgr_init(), sysclk_init(), uhc_start(), uhi_msc_mem_get_lun(), ui_init(), ui_test_finish(), and ui_test_flag_reset().
void main_usb_connection_event | ( | uhc_device_t * | dev, |
bool | b_present | ||
) |
Notify that a USB device has been connected or disconnected.
dev | Pointer on USB device information |
b_present | true, if the device has been connected |
References lun_state, and ui_usb_connection_event().
void main_usb_sof_event | ( | void | ) |
Notify that a SOF has been sent (each 1 ms)
References main_usb_sof_counter, and ui_usb_sof_event().
|
static |
Referenced by main(), and main_usb_connection_event().
|
static |
Referenced by main(), and main_usb_sof_event().