Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if((P4IN&BIT7)==0 && opis_pom==0) //opis
- {
- opis_pom=1;
- clearDisplay();
- SEND_CMD(DD_RAM_ADDR);
- for(i=0; i<16; i++)
- {
- SEND_CHAR(opis[i]);
- }
- SEND_CMD(DD_RAM_ADDR2);
- for(i=16; i<31; i++)
- {
- SEND_CHAR(opis[i]);
- }
- mydelay(400);
- while((P4IN&BIT7)==0);
- }
- if((P4IN&BIT4)==0) //gra
- {
- clearDisplay();
- SEND_CMD(DD_RAM_ADDR);
- SEND_CHAR(1);
- mydelay(200);
- while(1)
- {
- if(xlabel!=0)
- {
- if((P4IN&BIT4)==0)
- {
- SEND_CMD(DATA_ROL_LEFT);
- xlabel--;
- while((P4IN&BIT4)==0);
- }
- }
- if(xlabel!=15)
- {
- if((P4IN&BIT5)==0)
- {
- SEND_CMD(DATA_ROL_RIGHT);
- xlabel++;
- while((P4IN&BIT5)==0);
- }
- }
- if((P4IN&BIT6)==0)
- {
- if(up==0)
- {
- clearDisplay();
- SEND_CMD(DD_RAM_ADDR2);
- SEND_CHAR(1);
- for(i=0; i<xlabel; i++)
- {
- SEND_CMD(DATA_ROL_RIGHT);
- }
- up=1;
- while((P4IN&BIT6)==0);
- mydelay(100);
- continue;
- }
- if(up==1)
- {
- clearDisplay();
- SEND_CMD(DD_RAM_ADDR);
- SEND_CHAR(1);
- for(i=0; i<xlabel; i++)
- {
- SEND_CMD(DATA_ROL_RIGHT);
- }
- up=0;
- while((P4IN&BIT6)==0);
- mydelay(100);
- continue;
- }
- }
- timer++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement