int main(void){ TExaS_Init(SW_PIN_PE3210,DAC_PIN_PB3210,ScopeOn); // bus clock at 80 MHz //Timer0A_Init(&songTask, F80HZ); Piano_Init(); Sound_Init(0); DAC_Init(); Heartbeat_Init(); // other initialization EnableInterrupts(); uint32_t input; while(1){ GPIO_PORTF_DATA_R ^= 0x04; input = Piano_In(); if (input == 0x04){ Sound_Play(A); } else if (input == 0x02){ Sound_Play(C); } else if (input == 0x01){ Sound_Play(Eb); } else if (input == 0x07){ Sound_Play(A); } else { Sound_Play(0); } } }
int main(void) { uint8_t bStatus = LCD_DRIVER_BUSY; BoardConfig_vfnInit(); SWTimer_Init(); LCDDriver_Init(); Heartbeat_Init(); for(;;) { SWTimer_ServiceTimers(); LCDDriver_Task(); if(bStatus == LCD_DRIVER_BUSY) { #if TEST == 1 bStatus = LCDDriver_WriteString(&gbaTestString[0], sizeof(gbaTestString)-1u); #elif TEST == 2 bStatus = LCDDriver_MoveCursor(5,2); #endif } } return 0; }