mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion] Sharing millis & micros for blackbox and simulator
This commit is contained in:
@@ -4,13 +4,15 @@ extern "C" {
|
||||
#include "mphalport.h"
|
||||
}
|
||||
|
||||
bool micropython_port_should_interrupt() {
|
||||
bool micropython_port_should_interrupt(bool force) {
|
||||
static int c = 0;
|
||||
c++;
|
||||
if (c%20000 != 0) {
|
||||
return false;
|
||||
if(!force) {
|
||||
c++;
|
||||
if (c%20000 != 0) {
|
||||
return false;
|
||||
}
|
||||
c = 0;
|
||||
}
|
||||
c = 0;
|
||||
Ion::Keyboard::State scan = Ion::Keyboard::scan();
|
||||
if (scan.keyDown((Ion::Keyboard::Key)mp_interrupt_char)) {
|
||||
mp_keyboard_interrupt();
|
||||
|
||||
Reference in New Issue
Block a user