Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void InitP0_14(){
- PINSEL0 &= ~((1 << (2*14)) | (1 << (2*14+1))); //already set to GPIO by default
- IODIR0 &= ~_BIT(14);
- }
- int main(void){
- printf_init();
- InitP0_14();
- while(TRUE){
- if ((IOPIN0 & (1<<14)) == 0){ // o== wcisniety
- simplePrintf("Pressed");
- } else {//puszczony
- simplePrintf("Released");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement