Beispiel #1
0
// the ctbot class
void native_ctbot_irreceiver_invoke(u08_t mref) {

  // JAVA: int getLeft()
  if(mref == NATIVE_METHOD_getCommand) {
//    cli();
    nvm_int_t val = ir_read();
//    sei();
    stack_push(val);
  }
}
Beispiel #2
0
Datei: eventl.c Projekt: nla/yaz
int iochan_is_alive(IOCHAN chan)
{
    struct yaz_poll_fd fds;
    int res;

    fds.fd = chan->fd;
    fds.input_mask = yaz_poll_read;
    res = yaz_poll(&fds, 1, 0, 0);
    if (res == 0)
        return 1;
    if (!ir_read(chan, EVENT_INPUT))
        return 0;
    return 1;
}