Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void pwmBuzzer(){ //random music
- uint16_t i;
- uint16_t song[64];
- int Song_Choice;
- if (Song_Choice==0){
- uint16_t song[64]={73,68,51,2,0,0,0,31,42,109,67,79,77,0,0,16,0,101,110,103,105,84,117,110,80,71,65,80,0,48,0,0,84,69,78,0,0,18,0,105,84,117,110,101,115,32,49,50,46,49,46,50,46,50,55,0,67,79,77,0,0,104,0,101};
- }
- else{
- uint16_t song[64]={103,105,84,117,110,80,71,65,80,0,48,0,0,84,69,78,0,0,18,0,105,84,117,110,101,115,32,49,50,46,49,46,50,46,50,55,0,67,79,77,0,0,104,0,101,73,68,51,2,0,0,0,31,42,109,67,79,77,0,0,16,0,101,110,};
- }
- int sound(){
- int Song_Choice;
- int end=0;
- LCD_Clear();
- LCD_WriteText("Choose sound");
- delay_mc(1000);
- LOOP:
- LCD_Clear();
- LCD_WriteText("Pururpu");
- while(end==0){
- if (!(PTA->PDIR & 1UL<<11)){
- LCD_Clear();
- Song_Choice=0;
- end=1;
- }
- if (!(PTB->PDIR & 1UL<<7)){
- LCD_Clear();
- LCD_WriteText("Truturu");
- while(end==0){
- if (!(PTB->PDIR & 1UL<<7))
- goto LOOP;
- if (!(PTA->PDIR & 1UL<<11)){
- LCD_Clear();
- Song_Choice=1;
- end=1;
- }
- }
- }
- }
- LCD_Clear();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement