當前位置: 首頁>>代碼示例>>C++>>正文


C++ BoardInit函數代碼示例

本文整理匯總了C++中BoardInit函數的典型用法代碼示例。如果您正苦於以下問題:C++ BoardInit函數的具體用法?C++ BoardInit怎麽用?C++ BoardInit使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了BoardInit函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: main

//****************************************************************************
//
//! Main function
//!
//! \param none
//!
//! This function
//!    1. Invokes the SLHost task
//!    2. Invokes the GetNTPTimeTask
//!
//! \return None.
//
//****************************************************************************
void main()
{
    long lRetVal = -1;

    //
    // Initialize Board configurations
    //
    BoardInit();

    //
    // Enable and configure DMA
    //
    UDMAInit();

    //
    // Pinmux for UART
    //
    PinMuxConfig();

    //
    // Configuring UART
    //
    InitTerm();

    //
    // Display Application Banner
    //
    DisplayBanner(APP_NAME);

    //
    // Start the SimpleLink Host
    //
    lRetVal = VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);
    if(lRetVal < 0)
    {
        ERR_PRINT(lRetVal);
        LOOP_FOREVER();
    }

    //
    // Start the GetNTPTime task
    //
    lRetVal = osi_TaskCreate(GetNTPTimeTask,
                    (const signed char *)"Get NTP Time",
                    OSI_STACK_SIZE,
                    NULL,
                    1,
                    NULL );

    if(lRetVal < 0)
    {
        ERR_PRINT(lRetVal);
        LOOP_FOREVER();
    }

    //
    // Start the task scheduler
    //
    osi_start();
}
開發者ID:nqd,項目名稱:cc3200,代碼行數:73,代碼來源:main.c

示例2: main

void main(void)
{
    int16_t moyenne;

    BoardInit();

    /* Configuration de l'ADC
     *  horloge: oscillateur RC interne
     *  résultat justifié à droite
     *  temps d'acquisition: 2*Tad (délai minimum entre 2 conversions)
     *  canal 4
     *  interruption desactivée
     *  tensions référence par défaut (Vref+ = AVdd / Vref- = AVss)
     */
    OpenADC(ADC_FOSC_RC|ADC_RIGHT_JUST|ADC_2_TAD, ADC_CH4|ADC_INT_OFF, 0);

    moyenne = 0;
    for (uint8_t i = 0; i < 16; i++) {
        ConvertADC();               /* démarrage conversion */
        while (BusyADC());          /* attente fin conversion */
        moyenne += ReadADC();       /* lecture résultat */
    }
    moyenne /= 16;

    while (1);
}
開發者ID:jcassette,項目名稱:tim-pic18-libs,代碼行數:26,代碼來源:adc1.c

示例3: main

//*****************************************************************************
//
//! Main 
//!
//! \param  none
//!
//! \return None
//!
//*****************************************************************************
void main()
{
    long lRetVal = -1;
    //
    // Initialize board configuration
    //
    BoardInit();

    PinMuxConfig();

    #ifndef NOTERM
        InitTerm();
    #endif

    lRetVal = ssl();
    if(lRetVal < 0)
    {
        ERR_PRINT(lRetVal);
    }

    //
    // power off network processor
    //
    sl_Stop(SL_STOP_TIMEOUT);
    LOOP_FOREVER();
}
開發者ID:moyanming,項目名稱:CC3200SDK_1.2.0,代碼行數:35,代碼來源:main.c

示例4: cmtDebug1

void
CmtSdCard::InitSetup( OMAP_MMCHS_REGS *mmc ) {
  uint32 reg_val;

  cmtDebug1( 4, 1, "InitSetup SoftReset", 0 );
  BoardInit( mmc );

  mmc->MMCHS_SYSCONFIG |= MMC_SOFTRESET;
  while( (__raw_readl( &(mmc->MMCHS_SYSSTATUS) ) & RESETDONE) == 0 );

  cmtDebug1( 4, 2, "...done. InitSetup AllReset", 0 );
  mmc->MMCHS_SYSCTL |= SOFTRESETALL;
  while( (__raw_readl( &(mmc->MMCHS_SYSCTL) ) & SOFTRESETALL) != 0x0 );

  cmtDebug1( 4, 3, "...done. InitSetup Clock Config", 0 );
  mmc->MMCHS_HCTL = DTW_1_BITMODE | SDBP_PWROFF | SDVS_3V0;
  mmc->MMCHS_CAPA |= VS30_3V0SUP | VS18_1V8SUP;

  reg_val = mmc->MMCHS_CON & RESERVED_MASK;

  mmc->MMCHS_CON = CTPL_MMC_SD | reg_val | WPP_ACTIVEHIGH |
      CDP_ACTIVEHIGH | MIT_CTO | DW8_1_4BITMODE | MODE_FUNC |
      STR_BLOCK | HR_NOHOSTRESP | INIT_NOINIT | NOOPENDRAIN;

  ClockConfig( mmc, CLK_INITSEQ, 0 );
  mmc->MMCHS_HCTL |= SDBP_PWRON;

  mmc->MMCHS_IE = 0x307f0033;
  cmtDebug1( 4, 4, "...done.", 0 );

  InitStream( mmc );
  }
開發者ID:hogiboygoy,項目名稱:cmt-lib,代碼行數:32,代碼來源:cmtSdTiOmap3530.cpp

示例5: main

int main() {
	long lRetVal = -1;
	val=0;
	BoardInit();
	PinMuxConfig();
	LedInit();
	
	//create OS tasks
	lRetVal = osi_TaskCreate(PushButtonHandler, 
		(signed char*) "PushButtonHandler",
		OSI_STACK_SIZE, NULL, 2, &g_PushButtonTask);

	if(lRetVal < 0)
    {
    ERR_PRINT(lRetVal);
    LOOP_FOREVER();
    }

    lRetVal = osi_TaskCreate(MainLoop, (signed char*)"MainLoop", 
                	OSI_STACK_SIZE, NULL, 1, NULL );
    
    if(lRetVal < 0)
    {
    ERR_PRINT(lRetVal);
    LOOP_FOREVER();
    }

    osi_start();

    for(;;) {

    }

	return 0;
}
開發者ID:yuch7,項目名稱:cc3200-MCU,代碼行數:35,代碼來源:main.c

示例6: Init

static void Init()
{
    long lRetVal = -1;
    BoardInit();
    UDMAInit();
    PinMuxConfig();
    InitTerm();

    InitializeAppVariables();

    //
    // Following function configure the device to default state by cleaning
    // the persistent settings stored in NVMEM (viz. connection profiles &
    // policies, power policy etc)
    //
    // Applications may choose to skip this step if the developer is sure
    // that the device is in its default state at start of applicaton
    //
    // Note that all profiles and persistent settings that were done on the
    // device will be lost
    //
    lRetVal = ConfigureSimpleLinkToDefaultState();

    if (lRetVal < 0) {
        if (DEVICE_NOT_IN_STATION_MODE == lRetVal)
            UART_PRINT(
                    "Failed to configure the device in its default state \n\r");

        LOOP_FOREVER()
        ;
    }

    //
    // Asumption is that the device is configured in station mode already
    // and it is in its default state
    //
    lRetVal = sl_Start(0, 0, 0);
    if (lRetVal < 0) {
        UART_PRINT("Failed to start the device \n\r");
        LOOP_FOREVER()
        ;
    }

    UART_PRINT("Connecting to AP: '%s'...\r\n", SSID_NAME);

    // Connecting to WLAN AP - Set with static parameters defined at common.h
    // After this call we will be connected and have IP address
    lRetVal = WlanConnect();
    if (lRetVal < 0) {
        UART_PRINT("Connection to AP failed \n\r");
        LOOP_FOREVER()
        ;
    }

    UART_PRINT("Connected to AP: '%s' \n\r", SSID_NAME);

#ifdef NEW_ID
    iobeam_Reset();
#endif
}
開發者ID:iobeam,項目名稱:iobeam-client-embedded,代碼行數:60,代碼來源:main.c

示例7: main

//****************************************************************************
//! Main function
//!
//! \param none
//! 
//! \return None.
//
//****************************************************************************
void main()
{
    // Initialize the board
    BoardInit();
    // Configure the pinmux settings for the peripherals exercised
    PinMuxConfig();

	#ifndef NOTERM
		// Configuring UART
		InitTerm();
		ClearTerm();
	#endif

    // Start the TCPServer task
    long lRetVal = osi_TaskCreate(InfiniteLoopTask,
                    (const signed char *)"Infinite Loop Task",
                    OSI_STACK_SIZE, 
                    NULL, 
                    1, 
                    NULL );
    if(lRetVal < 0)
    {
        ERR_PRINT(lRetVal);

        while(1);
    }

    // Start the task scheduler
    osi_start();

    TimerDeinitStop();
}
開發者ID:tzhenghao,項目名稱:TimerInterruptsOnCC3200,代碼行數:40,代碼來源:main.c

示例8: main

int main()
{
	/*
	 * Preparation
	 */
    // Board Initialization
    BoardInit();
    // Configuring UART
    InitTerm();

    // Connect to AP
    // Put your SSID and password in common.h
    long lRetVal = ConnectToAP();
    if(lRetVal < 0)
    {
    	UART_PRINT("Connection to AP failed\n\r");
        LOOP_FOREVER();
    }
    UART_PRINT("Connected to AP\n\r");
    if(lRetVal < 0)
    {
        LOOP_FOREVER();
    }

    // Declare thing
    Thing_Struct thing;

    // Connect to thethingsiO server
    lRetVal = ConnectTo_thethingsiO(&thing.thing_client);
       if(lRetVal < 0)
       {
           LOOP_FOREVER();
       }
    UART_PRINT("Thing client connected\n\r");

    // In order to initialize the thing correctly you have to use one of
    // following two methods:
    // 1. If you have already activated your thing you should set the token
    thing.token = "YOUR TOKEN HERE";
    // 2. Or if not copy the provided activation code here
    // and uncomment the following line
    // char *act_code = "YOUR ACTIVATION CODE HERE";
    // and activate the thing (uncomment the following line)
    // char *token = thing_activate(&thing, act_code);

    /* Intializes random number generator */
  //  time_t t;
  //  srand((unsigned) time(&t));
    while(1)
    {
    	char *sub = thing_subscribe(&thing);
    	if (strlen(sub) > 0)
    	{
    		UART_PRINT(sub);
    		UART_PRINT("\n\r");
    	}
    	// Free memory
    	free(sub);
    }
}
開發者ID:theThings,項目名稱:thethings.iO-TexasInstruments-library,代碼行數:60,代碼來源:main.c

示例9: target_initialise

int target_initialise(void)
{
    BoardInit();
    wlan_configure();
    sl_Start(0, 0, 0);
    // Both SSID and PASSWORD must be defined externally.
    wlan_connect(WIFI_SSID, WIFI_PASSWORD, SL_SEC_TYPE_WPA_WPA2);
}
開發者ID:BillTheBest,項目名稱:sample-apps,代碼行數:8,代碼來源:cc32xx_support.c

示例10: SX1278TASK_PROCESS

//##############################################################################################################
void SX1278TASK_PROCESS(void const * argument)
{
  uint32_t  Last;
  BoardInit( );    
  Radio = RadioDriverInit( );    
  Radio->Init( );
  Radio_UserInit();
  Radio->StartRx( );  
  Last=HAL_GetTick();
  while(1)
  {
    switch( Radio->Process( ))
    {
      case RF_CHANNEL_ACTIVITY_DETECTED:
        __NOP();
      break;
      case RF_CHANNEL_EMPTY:
        __NOP();__NOP();
      break;
      case RF_LEN_ERROR:
        __NOP();__NOP();__NOP();
      break;
      case RF_IDLE:
          __NOP();__NOP();__NOP();__NOP();        
      break;
      case RF_BUSY:
        __NOP();__NOP();__NOP();__NOP();__NOP();__NOP();
      break;
      
      case RF_RX_TIMEOUT:
        Radio_RxTimeout();
        break;
      case RF_RX_DONE:
        Radio->GetRxPacket( RadioBuffer, ( uint16_t* )&RadioLength );
        if( RadioLength > 0 )
        {
          Radio_RxDone(RadioBuffer,RadioLength);
        }        
        break;
      case RF_TX_DONE:    
        __NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();
        Radio->StartRx( );
        break;
      case RF_TX_TIMEOUT:
        
      break;
      default:
        break;
    }    
    osDelay(1);
    if(HAL_GetTick()-Last < 100)
    {
      Last = HAL_GetTick();
      Radio_Misc_Per100ms();
    }
  }
  
}
開發者ID:nimaltd,項目名稱:sx1278,代碼行數:59,代碼來源:radio.c

示例11: BoardAlloc

Board *PlayerMinMaxTestSetup() {
	uint8_t
		width = 6,
		height = 6;
	Board *b = BoardAlloc();
	BoardInit(b,width,height,PlayerMinMaxTestMap);
	PlayerMinMaxInit(b);
	return b;
}
開發者ID:asheidan,項目名稱:AI_ass1_c,代碼行數:9,代碼來源:PlayerMinMaxTest.c

示例12: RadioStart

void RadioStart()
{
	bool bTX = false;
  BoardInit( );

  GreenLedBlink();
	RedLedBlink();


  Radio = RadioDriverInit();
  Radio->Init();

  Radio->StartRx( );

	while(1)
	{
	  switch(Radio->Process())
    {
    case RF_RX_DONE:
				Radio->GetRxPacket( Buffer, ( uint16_t* )&BufferSize );
				if( BufferSize > 0 )
        {
					if (bDeviceState == CONFIGURED)
					{
						if (packet_sent == 1)
						{
							CDC_Send_DATA ((unsigned char*)Buffer,BufferSize);
						}
					}
				}

				GreenLedBlink();
				Radio->StartRx( );

				break;
    case RF_TX_DONE:
				RedLedBlink();
        Radio->StartRx( );
				bTX = false;
        break;
    default:
			if (bDeviceState == CONFIGURED)
			{
				if(bTX) break;
				if (Receive_length  != 0)
				{
					Radio->SetTxPacket( (unsigned char*)Receive_Buffer,Receive_length );
					CDC_Receive_DATA();
					Receive_length = 0;
					bTX = true;
				}
			}
			break;
    }
	}
}
開發者ID:2thetop,項目名稱:XRange,代碼行數:56,代碼來源:main.c

示例13: main

 int main( void)
 {
    BoardInit();

    while( 1)
    {		
        StateFlow();
    }	 

 }
開發者ID:IridescentLee,項目名稱:stm32f103,代碼行數:10,代碼來源:main.c

示例14: main

//****************************************************************************
//							MAIN FUNCTION
//****************************************************************************
int main()
{
    long lRetVal = -1;
    //
    // Board Initialization
    //
    BoardInit();

    //
    // Enable and configure DMA
    //
    UDMAInit();
    //
    // Pinmux for UART
    //
    PinMuxConfig();
    //
    // Configuring UART
    //
    InitTerm();
    //
    // Display Application Banner
    //
    DisplayBanner(APP_NAME);
    //
    // Start the SimpleLink Host
    //
    lRetVal = VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);
    if(lRetVal < 0)
    {
        ERR_PRINT(lRetVal);
        LOOP_FOREVER();
    }
    //
    // Start the Receiving file
    //

    lRetVal = osi_TaskCreate(cmd_dispatcher,
                    (const signed char *)"TFTP",
                    OSI_STACK_SIZE,
                    NULL,
                    1,
                    NULL );
    if(lRetVal < 0)
    {
        ERR_PRINT(lRetVal);
        LOOP_FOREVER();
    }

    //
    // Start the task scheduler
    //
    osi_start();
    return 0;
}
開發者ID:hangc2,項目名稱:wif,代碼行數:58,代碼來源:main.cpp

示例15: main

//****************************************************************************
//							MAIN FUNCTION
//****************************************************************************
void main() {
	
	//
	// Board Initialization
	//
	BoardInit();

	//
	// Pinmux for UART
	//
	PinMuxConfig();

#ifndef NOTERM
	//
	// Configuring UART
	//
	InitTerm();
	
    //
    // Display Application Banner
    //
    DisplayBanner(APP_NAME);
#endif

    //
    // Enable and configure DMA
    //
    UDMAInit();

    //
    // Start the SimpleLink Host
    //
    VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);
    //
    // Start the HttpServer Task
    //
    //

    osi_TaskCreate(HttpServerAppTask,
                    "WebSocketApp",
                        OSI_STACK_SIZE,
                        NULL,
                        HTTP_SERVER_APP_TASK_PRIORITY,
                        NULL );

    UART_PRINT("HttpServerApp Initialized \n\r");

    //
    // Start the task scheduler
    //
    osi_start();

	return;
}
開發者ID:bigcat26,項目名稱:cc3200-sdk,代碼行數:57,代碼來源:main.c


注:本文中的BoardInit函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。