]> hackdaworld.org Git - my-code/arm.git/blobdiff - betty/buttons.c
added a bitmap to betty lcd ram conversion tool
[my-code/arm.git] / betty / buttons.c
index 9eb99b5ac5ed0016a32e9b9e16e82503e94dceb0..21efe018d58d38d8f45ad0b55ce3ecb21e38d81f 100644 (file)
@@ -26,10 +26,10 @@ void button_init(t_button *button) {
        PINSEL0&=~((1<<27)|(1<<26));    // p0.13
 
        // ctrl databus for p2.18 - p2.24
-       PINSEL2&=(PINSEL2&(~((1<<5)|(1<<4))))|(1<<4);
+       PINSEL2=(PINSEL2&P2MASK&~((1<<5)|(1<<4)))|(1<<4);
 
        // ctrl addr bus for p3.20, p3.21
-       PINSEL2=(PINSEL2&(~((1<<27)|(1<<26)|(1<<25))))|(1<<27)|(1<<26);
+       PINSEL2=(PINSEL2&P2MASK&~((1<<27)|(1<<26)|(1<<25)))|(1<<27)|(1<<26);
 
        // input
        IODIR0&=~((1<<30)|(1<<28)|(1<<27)|(1<<22)|(1<<13));