GPIO PIN 0: 0x1
GPIO PIN 1: 0x2
GPIO PIN 2: 0x4
GPIO PIN 3: 0x8
GPIO PIN 4: 0x10
GPIO PIN 5: 0x20
GPIO PIN 6: 0x40
GPIO PIN 7: 0x80
GPIO PIN 8: 0x100
GPIO PIN 9: 0x200
GPIO PIN 10: 0x400
GPIO PIN 11: 0x800
GPIO PIN 12: 0x1000
GPIO PIN 13: 0x2000
GPIO PIN 14: 0x4000
GPIO PIN 15: 0x8000
GPIO PIN 16: 0x10000
GPIO PIN 17: 0x20000
GPIO PIN 18: 0x40000
GPIO PIN 19: 0x80000
GPIO PIN 20: 0x100000
GPIO PIN 21: 0x200000
GPIO PIN 22: 0x400000
GPIO PIN 23: 0x800000
GPIO PIN 24: 0x1000000
GPIO PIN 25: 0x2000000
GPIO PIN 26: 0x4000000
GPIO PIN 27: 0x8000000
#include<stdio.h>
int main(){
int gpio=1,i
for(i=0;i<28;i++){
printf("GPIO PIN %d: 0x%x\n",i,gpio<<i);
}
return(0);
} |