//............................................................................ void BSP_init(void) { Q_ALLEGE(QS_INIT((char *)0)); QS_RESET(); QS_OBJ_DICTIONARY(&l_time_tick); QS_USR_DICTIONARY(PHILO_STAT); l_stdOutStream << "DPP-Qt console example" << endl << "QP " << QP::QF::getVersion() << endl; BSP_randomSeed(1234U); }
/*..........................................................................*/ void BSP_init(void) { SystemInit(); /* initialize the clocking system */ GPIOInit(); /* initialize GPIO (sets up clock) */ GPIOSetDir(LED_PORT, LED_BIT, 1); /* set port for LED to output */ if (QS_INIT((void *)0) == 0) { /* initialize the QS software tracing */ Q_ERROR(); } QS_RESET(); QS_OBJ_DICTIONARY(&l_SysTick_Handler); QS_OBJ_DICTIONARY(&l_PIOINT0_IRQHandler); }
//............................................................................ void BSP_init(void) { // Enable the floating-point unit SCB->CPACR |= (0xFU << 20); // Enable lazy stacking for interrupt handlers. This allows FPU // instructions to be used within interrupt handlers, but at the // expense of extra stack and CPU usage. // FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); // Set the clocking to run directly from the crystal ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); // enable clock to the peripherals used by the application SYSCTL->RCGC2 |= (1U << 5); // enable clock to GPIOF __NOP(); // wait after enabling clocks __NOP(); __NOP(); // configure the LEDs and push buttons GPIOF->DIR |= (LED_RED | LED_GREEN | LED_BLUE); // set direction: output GPIOF->DEN |= (LED_RED | LED_GREEN | LED_BLUE); // digital enable GPIOF->DATA_Bits[LED_RED] = 0; // turn the LED off GPIOF->DATA_Bits[LED_GREEN] = 0; // turn the LED off GPIOF->DATA_Bits[LED_BLUE] = 0; // turn the LED off // configure the User Switches GPIOF->DIR &= ~(USR_SW1 | USR_SW2); // set direction: input ROM_GPIOPadConfigSet(GPIO_PORTF_BASE, (USR_SW1 | USR_SW2), GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); BSP_randomSeed(1234U); Q_ALLEGE(QS_INIT(static_cast<void *>(0))); QS_RESET(); QS_OBJ_DICTIONARY(&l_SysTick_Handler); QS_OBJ_DICTIONARY(&l_GPIOPortA_IRQHandler); QS_USR_DICTIONARY(PHILO_STAT); }
//............................................................................ void BSP_init(void) { Q_ALLEGE(QS_INIT(l_cmdLine)); QS_RESET(); QS_OBJ_DICTIONARY(&l_clock_tick); // must be called *after* QF::init() QS_USR_DICTIONARY(PHILO_STAT); }
//............................................................................ void BSP_init(void) { Q_ALLEGE(QS_INIT(l_cmdLine)); QS_RESET(); QS_OBJ_DICTIONARY(&l_clock_tick); QS_USR_DICTIONARY(PLAYER_TRIGGER); }