Ejemplo n.º 1
0
void SYS_Tasks ( void )
{
    /* Maintain system services */
    /* SYS_COMMAND layer tasks routine */ 
    SYS_CMD_Tasks();
    SYS_CONSOLE_Tasks(sysObj.sysConsole0);
    SYS_DEVCON_Tasks(sysObj.sysDevcon);
    /* SYS_TMR Device layer tasks routine */ 
    SYS_TMR_Tasks(sysObj.sysTmr);

    /* Maintain Device Drivers */

    /* Maintain Middleware & Other Libraries */
    /* Maintain the TCP/IP Stack*/
    TCPIP_STACK_Task(sysObj.tcpip);

 
    /* USB HS Driver Task Routine */ 
     DRV_USBHS_Tasks(sysObj.drvUSBObject);
     
    /* USB Device layer tasks routine */ 
    USB_DEVICE_Tasks(sysObj.usbDevObject0);
 

    /* Maintain the application's state machine. */
    APP_Tasks();
}
Ejemplo n.º 2
0
static void ConsoleFlush(void)
{
    do {
        SYS_DEVCON_Tasks(sysObj.sysDevcon);
        SYS_CONSOLE_Tasks(sysObj.sysConsole0);
    } while (SYS_CONSOLE_Status(sysObj.sysConsole0) != SYS_STATUS_READY);
}
Ejemplo n.º 3
0
void SYS_Tasks ( void )
{
    /* Maintain the state machines of all library modules executing polled in
    the system. */

    /* Maintain system services */
    SYS_DEVCON_Tasks(sysObj.sysDevcon);
    SYS_CONSOLE_Tasks(sysObj.sysConsole0);

    /* Maintain Device Drivers */
    /* USB Device layer tasks routine */ 
    USB_DEVICE_Tasks(sysObj.usbDevObject0);

    /* Maintain the application's state machine. */
    APP_Tasks();
}
Ejemplo n.º 4
0
void SYS_Tasks ( void )
{
    /* Maintain system services */
    SYS_DEVCON_Tasks(sysObj.sysDevcon);
    SYS_CONSOLE_Tasks(sysObj.sysConsole0);
    SYS_CMD_Tasks();
    SYS_TMR_Tasks(sysObj.sysTmr);

    /* Maintain Device Drivers */
        DRV_TMR_Tasks(sysObj.drvTmr0);

    /* Maintain Middleware & Other Libraries */
    /* Maintain the TCP/IP Stack*/
    TCPIP_STACK_Task(sysObj.tcpip);


    /* Maintain the application's state machine. */
    APP_Tasks();
}
Ejemplo n.º 5
0
/*******************************************************************************
  Function:
    void _SYS_Tasks ( void )

  Summary:
    Maintains state machines of system modules.
*/
static void _SYS_Tasks ( void)
{
    TIMEOUT_THREAD_0_START;
    while(1)
    {
        /* Maintain system services */
        SYS_DEVCON_Tasks(sysObj.sysDevcon);
        /* Maintain the file system state machine. */
        SYS_FS_Tasks();
        SYS_CONSOLE_Tasks(sysObj.sysConsole0);
        /* SYS_COMMAND layer tasks routine */ 
        SYS_CMD_Tasks();
        /* SYS_TMR Device layer tasks routine */ 
        SYS_TMR_Tasks(sysObj.sysTmr);

        /* Maintain Device Drivers */
        DRV_SST25VF064C_Tasks(sysObj.drvSst25vf064c0);
        DRV_SDCARD_Tasks(sysObj.drvSDCard);

        /* Maintain Middleware */
        NET_PRES_Tasks(sysObj.netPres);
        /* Maintain the TCP/IP Stack*/

        wdt_arm_thread_0();
        wdt_kick();
        if(TIMEOUT_THREAD_0(10))
        {
            TIMEOUT_THREAD_0_START;
            SYS_DEBUG(SYS_ERROR_INFO, "MON: SYS Stack size: %d\r\n",uxTaskGetStackHighWaterMark(NULL));
            size_t libc_heap_usage_total = TrackHeap_TotalUsage();
            size_t libc_heap_usage_max = TrackHeap_MaxUsage();
            SYS_DEBUG(SYS_ERROR_INFO, "MON: heap usage: %dKB (%dKB), free: %dKB\r\n", libc_heap_usage_total / 1024, libc_heap_usage_max / 1024,xPortGetFreeHeapSize() / 1024);
        }
        /* Task Delay */
        vTaskDelay(1 / portTICK_PERIOD_MS);
    }
}