Advertisement
errypuu

GPIO Block Code

Dec 23rd, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. volatile uint32_t* GPIO4_SYSCONFIG = (volatile uint32_t*) 0x48059010;
  2. volatile uint32_t* GPIO4_SYSSTATUS = (volatile uint32_t*) 0x48059114;
  3. volatile uint32_t* GPIO4_OE = (volatile uint32_t*) 0x48059134;
  4. volatile uint32_t* GPIO4_DATAOUT = (volatile uint32_t*) 0x4805913C;
  5.  
  6.  *GPIO4_OE=(uint32_t)0x1;  
  7.  for(int i=0;i<10;i++)
  8.     {
  9.         for(int j=0;j<delay;j++)
  10.         {
  11.             for(int k=0;k<delay;k++)
  12.             {
  13.                 for(int l=0;l<delay;l++)
  14.                 {
  15.                     asm volatile ("NOP");
  16.                 }
  17.             }
  18.         }
  19.         if(i%2==0)
  20.             *GPIO4_DATAOUT=(uint32_t)(0<<14);s
  21.            
  22.         else if(i%2==1)
  23.             *GPIO4_DATAOUT=(uint32_t)(1<<14);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement