Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. unsigned int* punt;
  2.  
  3. void main (void)
  4. {
  5.  
  6. punt=(unsigned int *) 0x40021014;
  7. *punt |= 1<<17; //IOPA enable
  8. *punt |= 1<<21; //IOPE enable
  9.  
  10.  
  11. punt=(unsigned int *) 0x48001000;
  12. *punt |=0x55550000;
  13.  
  14.  
  15. punt=(unsigned int *) 0x48000000;
  16. *punt &= -((unsigned int)3);
  17.  
  18.  
  19. while(1)
  20. {
  21.  
  22. punt=(unsigned int *) 0x48000010;
  23.  
  24. if ((*punt&0x1)==0x1)
  25. {
  26.  
  27. punt = (unsigned int*) 0x48001014;
  28. *punt = 255<<8;
  29. }
  30. else
  31. {
  32. punt=(unsigned int*) 0x48001014;
  33. *punt=0<<8;
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement