unable to read port memory
KeyInputMemory[column_count] = (uint16_t)(GPIOB->IDR);
uint16_t mask = 0x0FFF;
KeyInputMemory[column_count] &= mask;
if (KeyInputMemory[column_count] == StoredKeyInput[column_count]) { //
KeyInputCounter[column_count]++;
if (KeyInputCounter[column_count] > 5) {
StoredKeyInput[column_count] = KeyInputMemory[column_count];
// Reset the counter
//KeyInputCounter[column_count] = 0;
}
} else {
// Store the current key input into the column stored key input
StoredKeyInput[column_count] = KeyInputMemory[column_count];
// Clear the key input count
KeyInputCounter[column_count] = 0;
//EXIT
return;
} I have physical keyboard i have to read b port but not detecting is my logic is true or false....... whenever key is pressed not reading the values
