本文整理汇总了C++中PE_low_level_init函数的典型用法代码示例。如果您正苦于以下问题:C++ PE_low_level_init函数的具体用法?C++ PE_low_level_init怎么用?C++ PE_low_level_init使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PE_low_level_init函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(void)
{
/* Write your local variable definition here */
uint32 i = 0;
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
//printf ("\n\n");
//printf("********************************************************\n");
//printf("* \n");
//printf("* Running SPI Demo, Master & Slave exchanged messages \n");
//printf("* Before continuing connect SPI0(Master) \n");
//printf("* to SPI1 (Slave) as outlined below \n");
//printf("* \n");
//printf("* MOSI: PTA17 (J2 pin 11) to PTE1 (J2 pin 20) \n");
//printf("* MISO: PTA16 (J2 pin 9) to PTE3 (J9 pin 11) \n");
//printf("* SCK: PTC5 (J1 pin 9) to PTE2 (J9 pin 9) \n");
//printf("* PCS0: PTC4 (J1 pin 7) to PTE4 (J9 pin 13) \n");
//printf("* \n");
//printf("* Then enter any key to continue \n");
//printf("* \n");
//printf("********************************************************\n");
//printf ("\n\n");
/* Slave receiving some message from master*/
SS1_ReceiveBlock(SS1_DeviceData, slave_receive, COMM_SIZE);
for(;;){
for(i=0;i<10000;i++){
//printf("\nSlave: first sending\n");
} //Delay
}
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
return 0;
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例2: main
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
/* For example: for(;;) { } */
byte c, err;
for (;;) {
do {
err = UART_RecvChar(&c);
} while(err != ERR_OK);
sendString("Press R, G or B to toggle the red, green or blue LEDs.\r\nPress ESC to close.\r\n");
do {
do {
err = UART_RecvChar(&c);
} while(err != ERR_OK);
if (c == 0x52 || c == 0x72) {
Red_NegVal();
sendString("Toggle red.\r\n");
} else if (c == 0x47 || c == 0x67) {
Green_NegVal();
sendString("Toggle green.\r\n");
} else if (c == 0x42 || c == 0x62) {
Blue_NegVal();
sendString("Toggle blue.\r\n");
}
} while(c != 0x1B);
sendString("Press any key to start.\r\n");
Red_SetVal();
Green_SetVal();
Blue_SetVal();
}
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例3: main
void main(void)
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
Cap1_Reset();
/* Write your code here */
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例4: main
void main(void)
{
/* Write your local variable definition here */
BOOT_PreInit();
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
BOOT_Start();
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例5: main
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
for(;;) {
LEDR_On();
WAIT1_Waitms(500);
LEDR_Off();
WAIT1_Waitms(500);
LEDG_On();
WAIT1_Waitms(500);
LEDG_Off();
LEDB_On();
WAIT1_Waitms(500);
LEDB_Off();
LEDR_SetRatio16(0xc000);
WAIT1_Waitms(500);
LEDR_SetRatio16(0x8000);
WAIT1_Waitms(500);
LEDR_SetRatio16(0x4000);
WAIT1_Waitms(500);
LEDR_SetRatio16(0x1000);
WAIT1_Waitms(500);
LEDR_SetRatio16(0x500);
WAIT1_Waitms(500);
LEDR_SetRatio16(0x100);
WAIT1_Waitms(500);
}
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例6: main
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
enum logics{false, true};
uint16_t rotation = 0;
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
lcd_init(Background);
add2display((unsigned char *)"University of Nairobi",0);
add2display((unsigned char *)" Physics Department ",0);
add2display((unsigned char *)" another string for ",0);
add2display((unsigned char *)" another string menu ",0);
selected=0;
while(1){
if(rotation>3)
rotation = 0;
if(selected>3)
selected=0;
lcd_setOrientation(rotation);
lcd_clear(Background);
display();
//lcd_invert(rotation);
lcd_fillrect(10,50,40,60, blue);
lcd_drawrect(10,50,40,60, red);
lcd_drawline(11,51,39,59, green);
lcd_drawcircle(30, 100,10, red);
lcd_fillcircle(30, 100,10, crimson);
WAIT1_Waitms(1000);
selected++;
rotation++;
}
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例7: main
void main(void)
{
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
nLoop = 0;
SCIcount=0;
AD1_Start();
Puls1_Enable();
Puls2_Enable();
TI1_DisableEvent();
Cpu_Delay100US(10000);
if(!AD_Flag)
{
calibrateSensor();
TI1_EnableEvent();
AD_Flag = 1;
}
//----------------------------------------------------------------
for(;;)
{
nLoop ++;
if(nLoop >= LOOP_TIME)
nLoop = 0;
else
continue;
//----------------------------------------------------------------
if((g_fGyroscopeAngleIntegral < 50.0) && (g_fGyroscopeAngleIntegral > -50.0)) //ж╠а╒еп╤о
standFlag = 1;
else if((g_fGyroscopeAngleIntegral >= 50.0) || (g_fGyroscopeAngleIntegral <= -50.0))
standFlag = 0;
//----------------------------------------------------------------
Cpu_Delay100US(100);
if(UartFlag == 1)
{
sendData();
UartFlag = 0;
}
receiveData();
}
}
示例8: main
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
float temperature, humidity;
uint8_t res;
unsigned char buf[32];
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
CLS1_SendStr("\r\n-----------------------\r\nSHT11 Example\r\n-----------------------\r\n", CLS1_GetStdio()->stdOut);
res = SHT11_SoftReset();
if (res!=ERR_OK) {
CLS1_SendStr("FAILED to reset device\r\n ", CLS1_GetStdio()->stdErr);
for(;;){}
}
for(;;) {
SHT11_Read(&temperature, &humidity);
CLS1_SendStr("Temperature ", CLS1_GetStdio()->stdOut);
buf[0] = '\0';
UTIL1_strcatNum32sDotValue100(buf, sizeof(buf), temperature*100);
CLS1_SendStr(buf, CLS1_GetStdio()->stdOut);
CLS1_SendStr("°C, Humidity ", CLS1_GetStdio()->stdOut);
buf[0] = '\0';
UTIL1_strcatNum32sDotValue100(buf, sizeof(buf), humidity*100);
CLS1_SendStr(buf, CLS1_GetStdio()->stdOut);
CLS1_SendStr("%\r\n", CLS1_GetStdio()->stdOut);
WAIT1_Waitms(1000);
LED1_Neg();
}
/* For example: for(;;) { } */
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例9: main
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
LED2_On();
WAIT1_Waitms(1000);
LED2_Off();
#if PL_HAS_LOW_POWER
LP_Init();
#endif
#if PL_HAS_RTOS
if (FRTOS1_xTaskCreate(BlinkTask, "Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error */
}
#endif
#if PL_HAS_SHELL
SHELL_Init();
#endif
#if PL_HAS_RTOS
PEX_RTOS_START();
#endif
for(;;) {
LP_EnterPowerMode(LP_WAIT);
LED1_On();
WAIT1_Waitms(20);
LED1_Off();
}
/* For example: for(;;) { } */
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例10: main
int main(void) {
PE_low_level_init(); /* low level driver initialization, do not remove */
for(;;) {
int result, value;
printf("Please enter a number:\r\n");
result = scanf("%d", &value);
while('\n' != getchar()); /* skip rest of input until '\n' */
if (result==1) { /* one value read */
printf("You entered: '%d'\r\n", value);
} else {
printf("Wrong number of input: is '%d' but should be '1'!\r\n", result);
}
}
/* do not leave main! */
return 0;
}
示例11: main
void main(void)
{
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/*Write your code here*/
/* Just jump to the real main(). */
__asm
{
jmp vMain
}
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;);
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例12: main
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
if (FRTOS1_xTaskCreate(
Task1, /* pointer to the task */
(signed portCHAR *)"Task1", /* task name for kernel awareness debugging */
configMINIMAL_STACK_SIZE, /* task stack size */
(void*)NULL, /* optional task startup argument */
tskIDLE_PRIORITY, /* initial priority */
(xTaskHandle*)NULL /* optional task handle to create */
) != pdPASS) {
/*lint -e527 */
for(;;){}; /* error! probably out of memory */
/*lint +e527 */
}
if (FRTOS1_xTaskCreate(
Task2, /* pointer to the task */
(signed portCHAR *)"Task2", /* task name for kernel awareness debugging */
configMINIMAL_STACK_SIZE, /* task stack size */
(void*)NULL, /* optional task startup argument */
tskIDLE_PRIORITY, /* initial priority */
(xTaskHandle*)NULL /* optional task handle to create */
) != pdPASS) {
/*lint -e527 */
for(;;){}; /* error! probably out of memory */
/*lint +e527 */
}
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例13: main
int main(void)
{
PE_low_level_init();
gpio_init();
uart_init();
i2c_init();
gps_sate_data_init();
while(1)
{
// Wait to receive input data
if(kStatus_LPSCI_Success == LPSCI_HAL_ReceiveDataPolling(UART0, &SBUF,1))
{
// Echo received character
// LPSCI_HAL_SendDataPolling(UART0, &SBUF, 1);
gps_parser();
}
GPIO_Test_for_TE();
}
}
示例14: main
void main(void)
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
APP_Run();
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
示例15: main
void main (void){
timer= newObj(Timer,(ulong)500);
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
Teclas_Init();
Display_Init(); // Inicializacion del display
Grabacion_Init();
newAllocObj(&mainThread,ThreadAdjuntable);
cap=GET_INSTANCE();
#ifdef _ENTRADA_SIMULADA
CapturadorSimulado_setMicroSegundos(cap,100000000);
CapturadorSimulado_setPulsos(cap,2);
#endif
{
void * adjuntador= ThreadAdjuntable_getAdjuntador(&mainThread);
newAllocObj(&sensorRpm,SensorRpm,adjuntador,1000,cap,&config,"SEn rPM");
deleteObj(&adjuntador);
}
for(;;){
WDog1_Clear();
if(Timer_isfinish(timer)){
Timer_Restart(timer);
_GetterPrint(&sensorRpm,1);
// Pasar_Numero(Capturador_getMicroSegundos(cap)/1000,0,0);
// Pasar_Numero(Capturador_getPulsos(cap),1,0);
// CapturadorSimulado_setPulsos(cap,CapturadorSimulado_getPulsos(cap)+1);
}
//Eventos
MethodContainer_Execute(&mainThread);
}
}