Exemple #1
0
//
// Customize the jump list and add a user task to Task category
//
HRESULT JumpList::AddUserTask(const wchar_t* applicationPath, const wchar_t* title, const wchar_t* commandLine)
{
    // Create a destination list
    HRESULT hr = CoCreateInstance(CLSID_DestinationList, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&m_destinationList));

    // Set application Id
    if (SUCCEEDED(hr))
    {
        hr = m_destinationList->SetAppID(m_appId.c_str());
    }

    // Begin to build a session for the jump list
    if (SUCCEEDED(hr))
    {
        UINT cMinSlots;
        hr = m_destinationList->BeginList(&cMinSlots, IID_PPV_ARGS(&m_objectArray));
    }

    // Add User tasks
    if (SUCCEEDED(hr))
    {
        hr = CreateUserTask(applicationPath, title, commandLine);
    }

    // Commit list
    if (SUCCEEDED(hr))
    {
        hr = m_destinationList->CommitList();
    }

    return hr;
}
Exemple #2
0
/*****************************************************************************
 * Function Name        // task_start
 * Descriptor             // before create multi_task, we create a task_start task
 *                      	   // in this example, this task display the cpu usage
 * Input                
 * Output              
 * Return              
 ****************************************************************************/
void task_start (void *data)
{
    extern void CreateUserTask(void);
    extern void  RestoreParamToDefault(void);
    int err;
    u8 mac_addr[6];
    u8 tx_gain[12];
    u8 errstatus;

    tls_irq_init();

    /* initial os ticker */
    tls_os_timer_init(); 

#if OS_TASK_STAT_EN > 0
    /* Initialize uC/OS-II's statistics */
    OSStatInit();
#endif

    tls_spi_slave_sel(SPI_SLAVE_FLASH);	
    tls_spi_init();
    tls_fls_init();
    tls_fls_gd25qxx_drv_install();
	
	tls_restore_param_from_backup();	
	RestoreParamToDefault();
	//tls_param_to_default();

    err = tls_param_init(); 
    if (err) {
        TLS_DBGPRT_INFO("read spi param err\n"); 
    }
    tls_fwup_init();

    /* ¶ÁÈ¡efuseÖеÄmacµØÖ· */
   	tls_get_mac_addr(mac_addr);
	tls_get_tx_gain(tx_gain);
    
    TLS_DBGPRT_INFO("tx gain ");
    TLS_DBGPRT_DUMP(&tx_gain[0], 12);
    TLS_DBGPRT_INFO("mac addr ");
    TLS_DBGPRT_DUMP(&mac_addr[0], 6);

    if(tls_wl_init(tx_gain, &mac_addr[0]) == NULL){
        TLS_DBGPRT_INFO("wl driver initial failured\n");
    }
    if (wpa_supplicant_init(mac_addr)) {
        TLS_DBGPRT_INFO("supplicant initial failured\n");
    }

    tls_ethernet_init();

    tls_sys_init();

#if TLS_CONFIG_HOSTIF
    tls_hostif_init();
#endif
#if (TLS_CONFIG_HOSTIF && TLS_CONFIG_HS_SPI)
    tls_hspi_init();
#endif

#if (TLS_CONFIG_HOSTIF &&TLS_CONFIG_UART)
    tls_uart_init();
#endif

   	tls_sys_auto_mode_run(); 
	tls_netif_add_status_event(tls_main_net_status_changed);
	BLINKTIMER = OSTmrCreate(0, 10, 2, BlinkTimerProc, NULL, NULL, &errstatus);
	if (BLINKTIMER){
		OSTmrStart(BLINKTIMER, &errstatus);	
	}

	tls_wifi_one_shot_init();

    disp_version_info();
	/* User start here */
	CreateUserTask();
    for (;;)
    {
        tls_os_time_delay(0x10000000);
    }
}