Blame view

Giac_maj/epsilon-giac/python/port/interrupt_helper.cpp 335 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  #include "interrupt_helper.h"
  #include <ion.h>
  extern "C" {
  #include "mphalport.h"
  }
  
  void shouldInterrupt() {
    static int c = 0;
    c++;
    if (c%20000 != 0) {
      return;
    }
    c = 0;
    Ion::Keyboard::State scan = Ion::Keyboard::scan();
    if (scan.keyDown((Ion::Keyboard::Key)mp_interrupt_char)) {
      mp_keyboard_interrupt();
    }
  }