Macros | |
#define | SYS_NB_MOD 4 |
Enumerations | |
enum | eModId { SYS_MODID_NONE = -1, SYS_MODID_COM1SHELL = 1, SYS_MODID_HTTP = 2, SYS_MODID_USB = 4, SYS_MODID_MMI = 8 } |
enum | eStatus { SYS_STATUS_STARTUP, SYS_STATUS_RUNNING, SYS_STATUS_DOWN } |
Functions | |
bool | b_supervisor_IsInMaintenanceMode (void) |
Maintenance mode status. More... | |
bool | b_supervisor_leave_UsbMassStorage_mode (void) |
Leave the USB Mass Storage mode while the USB host is plugged in. More... | |
bool | b_supervisor_leave_waitingforhost_mode (void) |
Leave the waiting-for-host mode while the USB host has not been plugged in yet. More... | |
bool | b_supervisor_switch_to_maintenance_mode (void) |
The switch-to-maintenance-mode command: initiate the process to switch to maintenance mode. More... | |
bool | b_USBHostCopyCfg (void) |
Launch the "Upload CFG Files" MMI task that copies the /CFG directory from the USB Mass Storage device to the Control Panel. More... | |
bool | b_USBHostCopyLogs (void) |
Launch the "Copy Logs" MMI task that copies the /LOG directory from the Control Panel to the USB Mass Storage device. More... | |
bool | b_USBHostCopyWeb (void) |
Launch the "Upload WEB Files" MMI task that copies the /WEB directory from the USB Mass Storage device to the Control Panel. More... | |
bool | b_USBHostMoveLogs (void) |
Launch the "Move Logs" MMI task that moves the /LOG directory content from the Control Panel to the USB Mass Storage device. More... | |
void | v_supervisor_Device_Connects (void) |
Called upon remote device connection (upon PIN ID CHANGE event when we are host) More... | |
void | v_supervisor_Device_Disconnects (void) |
Called upon remote device disconnection. More... | |
void | v_supervisor_Host_Connects (void) |
Called upon remote host connect (upon VBUS ON event when we are device) More... | |
void | v_supervisor_Host_Disconnects (void) |
Called upon remote host disconnection. More... | |
void | vSupervisor_Start (unsigned portBASE_TYPE uxPriority) |
Start the supervisor module. More... | |
portBASE_TYPE | x_supervisor_SemaphoreGive (xSemaphoreHandle xSemaphore) |
Release a system mutex. More... | |
portBASE_TYPE | x_supervisor_SemaphoreTake (xSemaphoreHandle xSemaphore, portTickType xBlockTime) |
Take a system mutex. More... | |
#define SYS_NB_MOD 4 |
Number of modules id.
enum eModId |
enum eStatus |
Maintenance mode status.
References bIsInMaintenance.
Referenced by e_syscmds_reboot().
Leave the USB Mass Storage mode while the USB host is plugged in.
References bIsInMaintenance, pdTRUE, prv_v_leave_maintenance_mode(), and Usb_detach.
Leave the waiting-for-host mode while the USB host has not been plugged in yet.
References bIsInMaintenance, pdTRUE, and prv_v_common_leave_UsbDevice_mode().
The switch-to-maintenance-mode command: initiate the process to
switch to maintenance mode.
References e_supervisor_switch_to_maintenance_mode(), NULL, pdTRUE, and SYS_MODID_NONE.
Launch the "Upload CFG Files" MMI task that copies the /CFG directory from the USB Mass Storage device to the Control Panel.
References e_usbsys_cp_cfg_to_local(), eUserMenuUSBHost, eUserMenuUSBHostActing, NAKED_TRACE_COM2, NULL, pdFALSE, pdTRUE, SHELL_EXECSTATUS_KO, sMmiNavId, SYS_MODID_MMI, vMMI_SetUserMenuMode(), and vTaskDelay().
Launch the "Copy Logs" MMI task that copies the /LOG directory from the
Control Panel to the USB Mass Storage device.
References e_usbsys_cp_logs_to_key(), eUserMenuUSBHost, eUserMenuUSBHostActing, NAKED_TRACE_COM2, NULL, pdFALSE, pdTRUE, SHELL_EXECSTATUS_KO, sMmiNavId, SYS_MODID_MMI, vMMI_SetUserMenuMode(), and vTaskDelay().
Launch the "Upload WEB Files" MMI task that copies the /WEB directory from the USB Mass Storage device to the Control Panel.
References e_usbsys_cp_web_to_local(), eUserMenuUSBHost, eUserMenuUSBHostActing, NAKED_TRACE_COM2, NULL, pdFALSE, pdTRUE, SHELL_EXECSTATUS_KO, sMmiNavId, SYS_MODID_MMI, vMMI_SetUserMenuMode(), and vTaskDelay().
Launch the "Move Logs" MMI task that moves the /LOG directory content
from the Control Panel to the USB Mass Storage device.
References e_usbsys_mv_logs_to_key(), eUserMenuUSBHost, eUserMenuUSBHostActing, NAKED_TRACE_COM2, NULL, pdFALSE, pdTRUE, SHELL_EXECSTATUS_KO, sMmiNavId, SYS_MODID_MMI, vMMI_SetUserMenuMode(), and vTaskDelay().
Called upon remote device connection (upon PIN ID CHANGE event when we are host)
References SUPERVISOR_USB_ROLE_HOST, SUPERVISOR_USB_ROLE_NONE, and u8CurrentUsbRole.
Called upon remote device disconnection.
Called upon remote device disconnection.
References ms_connected, ms_new_device_connected, SUPERVISOR_USB_ROLE_HOST, SUPERVISOR_USB_ROLE_NONE, and u8CurrentUsbRole.
Called upon remote host connect (upon VBUS ON event when we are device)
References bIsInMaintenance, SUPERVISOR_USB_ROLE_DEVICE, SUPERVISOR_USB_ROLE_NONE, u8CurrentUsbRole, u8IsMaintenanceRequired, Usb_detach, and Usb_unfreeze_clock.
Called upon remote host disconnection.
Called upon remote host disconnection.
References bIsInMaintenance, bOutOfMaintenance, SUPERVISOR_USB_ROLE_DEVICE, SUPERVISOR_USB_ROLE_NONE, and u8CurrentUsbRole.
void vSupervisor_Start | ( | unsigned portBASE_TYPE | uxPriority | ) |
Start the supervisor module.
uxPriority | The priority base of the supervisor tasks. |
References NULL, SUPERVISOR_STACK_SIZE, and xTaskCreate.
Referenced by main().
portBASE_TYPE x_supervisor_SemaphoreGive | ( | xSemaphoreHandle | xSemaphore | ) |
Release a system mutex.
xSemaphore | A handle to the semaphore being released. |
References bIsInMaintenance, bOutOfMaintenance, eUserMenuWaitHost, fat_cache_flush(), Is_usb_clock_frozen, Is_usb_detached, nav_reset(), pdTRUE, SUPERVISOR_MAINTENANCE_NBMUTEX_TOTAKE, TRACE_COM2, u8IsMaintenanceRequired, Usb_attach, Usb_detach, Usb_unfreeze_clock, vMMI_SetUserMenuMode(), vTaskDelay(), and xSemaphoreGive.
Referenced by b_joystick_init(), b_light_init(), b_potentiometer_init(), b_pushb1_init(), b_pushb2_init(), b_pushb3_init(), b_temperature_init(), e_sensor_cmd_set_config(), e_syscmds_cmd_set_config(), portTASK_FUNCTION(), prvEthernetConfigureInterface(), Shell_exec(), and usb_mass_storage_csw().
portBASE_TYPE x_supervisor_SemaphoreTake | ( | xSemaphoreHandle | xSemaphore, |
portTickType | xBlockTime | ||
) |
Take a system mutex.
xSemaphore | A handle to the semaphore being obtained. |
xBlockTime | The time in ticks to wait for the semaphore to become available. |
xSemaphore | A handle to the semaphore being released. |
xBlockTime | The time in ticks to wait for the semaphore to become available. |
References bOutOfMaintenance, pdFALSE, and xSemaphoreTake.
Referenced by b_joystick_init(), b_light_init(), b_potentiometer_init(), b_pushb1_init(), b_pushb2_init(), b_pushb3_init(), b_temperature_init(), e_sensor_cmd_set_config(), e_supervisor_switch_to_maintenance_mode(), e_syscmds_cmd_set_config(), portTASK_FUNCTION(), prvEthernetConfigureInterface(), Shell_exec(), and usb_mass_storage_cbw().