change button gpio init to be like other programs, as part of gpio_init()

This commit is contained in:
true
2024-08-08 03:32:59 -07:00
parent 340cdcad89
commit 3a48cd8f06
2 changed files with 15 additions and 7 deletions

View File

@@ -18,10 +18,10 @@ void btn_init()
{
uint8_t i;
// configure GPIO
BTN_PORT->BSHR = (BTN1_PUPD << BTN1_PIN) | (BTN2_PUPD << BTN2_PIN);
BTN_PORT->CFGLR &= ~((0xf << (BTN1_PIN*4)) | ((0xf << (BTN2_PIN*4))));
BTN_PORT->CFGLR |= (0x8 << (BTN1_PIN*4)) | (0x8 << (BTN2_PIN*4));
// configure GPIO (now handled as part of main GPIO init function)
// BTN_PORT->BSHR = (BTN1_PUPD << BTN1_PIN) | (BTN2_PUPD << BTN2_PIN);
// BTN_PORT->CFGLR &= ~((0xf << (BTN1_PIN*4)) | ((0xf << (BTN2_PIN*4))));
// BTN_PORT->CFGLR |= (0x8 << (BTN1_PIN*4)) | (0x8 << (BTN2_PIN*4));
// configure default setup
for (i = 0; i < BTN_COUNT; i++) {