X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Farm.git;a=blobdiff_plain;f=betty%2Fbuttons.c;fp=betty%2Fbuttons.c;h=21efe018d58d38d8f45ad0b55ce3ecb21e38d81f;hp=9eb99b5ac5ed0016a32e9b9e16e82503e94dceb0;hb=5da509dc909c60d63c5fba98e7ced43040eb6827;hpb=b4ca71fc214ba3c58cec25661ba1f81cf7b1b871 diff --git a/betty/buttons.c b/betty/buttons.c index 9eb99b5..21efe01 100644 --- a/betty/buttons.c +++ b/betty/buttons.c @@ -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));