SHARE
TWEET

Untitled

a guest Jan 26th, 2020 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void pwmBuzzer(){ //random music
  2.     uint16_t i;
  3.     uint16_t song[64];
  4.     int Song_Choice;
  5.     if (Song_Choice==0){
  6.     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};
  7.     }
  8.     else{
  9.     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,};
  10.     }
  11.  
  12.  
  13.  
  14. int sound(){
  15.  
  16.     int Song_Choice;
  17.     int end=0;
  18.     LCD_Clear();
  19.     LCD_WriteText("Choose sound");
  20.     delay_mc(1000);
  21.     LOOP:
  22.     LCD_Clear();
  23.     LCD_WriteText("Pururpu");
  24.     while(end==0){
  25.         if (!(PTA->PDIR & 1UL<<11)){
  26.                 LCD_Clear();
  27.                 Song_Choice=0;
  28.                 end=1; 
  29.             }
  30.         if (!(PTB->PDIR & 1UL<<7)){
  31.             LCD_Clear();
  32.             LCD_WriteText("Truturu");
  33.             while(end==0){
  34.                 if (!(PTB->PDIR & 1UL<<7))
  35.                     goto LOOP;
  36.                 if (!(PTA->PDIR & 1UL<<11)){
  37.                     LCD_Clear();
  38.                     Song_Choice=1;
  39.                     end=1; 
  40.             }
  41.             }  
  42.       }
  43.     }
  44.     LCD_Clear();
  45.     return 0;
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top