本文整理汇总了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();
}
示例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);
}
示例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();
}
示例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 );
}
示例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;
}
示例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
}
示例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();
}
示例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);
}
}
示例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);
}
示例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();
}
}
}
示例11: BoardAlloc
Board *PlayerMinMaxTestSetup() {
uint8_t
width = 6,
height = 6;
Board *b = BoardAlloc();
BoardInit(b,width,height,PlayerMinMaxTestMap);
PlayerMinMaxInit(b);
return b;
}
示例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;
}
}
}
示例13: main
int main( void)
{
BoardInit();
while( 1)
{
StateFlow();
}
}
示例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;
}
示例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;
}