/* Main program : Initialize the system and start the first task */ int main (void) { Initialize_Button(USER); Initialize_Button(TAMPER); Initialize_Led(LED1); Initialize_Led(LED2); Initialize_Led(LED3); Initialize_Led(LED4); Initialize_Led(LED5); Initialize_Led(LED6); Initialize_Led(LED7); Initialize_Led(LED8); Turn_Led(LED1,ON); GPU_Init(); JOY_Init(); initSD(&fs32); wait(1000000); while(1) { // Start the task menu allow to choose the program // - GIF unicorn // - Street of rage // - Zelda os_sys_init (taskMenu); } } //Fin main
void IN_Init (void) { JOY_Init (); old_windowed_mouse = -1; /* Force update */ if (COM_CheckParm ("-nomouse")) return; mouse_x = mouse_y = 0.0; mouse_avail = 1; }
/*---------------------------------------------------------------------------- Main function *----------------------------------------------------------------------------*/ int main (void) { //SysTick_Config(SystemCoreClock/1000); /* Generate interrupt each 100 ms */ //Initialize the required I/O device libraries JOY_Init(); LED_Init(); SER_Init(); KBD_Init(); SRAM_Init(); GLCD_Init(); // LCD Initialization time.min = 0; time.hours = 12; time.sec = 0; USART3->CR1 |= (1<<5); //Enable the "data received" interrupt for USART3 NVIC_EnableIRQ(USART3_IRQn); //Enable interrupts for USART3 NVIC_SetPriority (USART3_IRQn, (1<<__NVIC_PRIO_BITS) - 1); resetList(); //memcpy(&tailMessage->text,"This is a test of some really random text that I'm sending as part of a text message. I hope it works! Let's keep typing just to see if we can fill up 160 chars",160); //Here we are manually setting the head node to display a "No Messages" message if we are not storing anything else memcpy(&headMessage->text,"No Messages",11); headMessage->length = 11; headMessage->prev = NULL; headMessage->next = NULL; headMessage->rxTime.hours = 0; headMessage->rxTime.min = 0; headMessage->rxTime.sec = 0; displayedMessage = headMessage; //Initialize the LCD init_display(); os_sys_init_prio(initTask,0xFE); }