uint8_t matrix_scan(void)
{
- if (mcp23018_status) {
+ if (mcp23018_status) {
/* if there was an error */
if (++mcp23018_reset_loop == 0) {
/* since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
- return (matrix[row] & ((matrix_row_t)1<col));
+ return (matrix[row] & ((matrix_row_t)1<<col));
}
inline
select_row(current_row);
wait_us(30);
- if (mcp23018_status) {
+ if (mcp23018_status) {
/* if there was an error */
return 0;
} else {
static void select_row(uint8_t row)
{
- if (mcp23018_status) {
+ if (mcp23018_status) {
/* if there was an error do nothing */
} else {
/* set active row low : 0