void keypad_key_event(unsigned int row, unsigned int col, bool press) { if (row == 2 && col == 0) { intrpt_set(INT_ON, press); if (press && control.ports[0] & 0x40) { control.readBatteryStatus = ~1; intrpt_pulse(19); } } else { if (press) { keypad.key_map[row] |= 1 << col; if (keypad.mode == 1) { keypad.status |= 4; keypad_intrpt_check(); } } else { keypad.key_map[row] &= ~(1 << col); } } }
void EMSCRIPTEN_KEEPALIVE keypad_key_event(unsigned int row, unsigned int col, bool press) { if (row == 2 && col == 0) { intrpt_set(INT_ON, press); if (press && calc_is_off()) { asic.ship_mode_enabled = false; control.readBatteryStatus = ~1; intrpt_pulse(19); } } else { if (press) { keypad.key_map[row] |= 1 << col; if (keypad.mode == 1) { keypad.status |= 4; keypad_intrpt_check(); } } else { keypad.data[row] = keypad.key_map[row] &= ~(1 << col); keypad.status |= 2; keypad_intrpt_check(); } } }