1 /* sample.cpp for TOPPERS/ATK(OSEK) */
\r
7 using namespace ecrobot;
\r
12 #include "kernel_id.h"
\r
13 #include "ecrobot_interface.h"
\r
16 // nxtOSEK hook to be invoked from an ISR in category 2
\r
17 void user_1ms_isr_type2(void)
\r
19 SleeperMonitor(); // needed for I2C device and Clock classes
\r
30 bool entrBtn = (bool)(nxt.getButtons() & Nxt::ENTR_ON);
\r
31 bool runBtn = (bool)(nxt.getButtons() & Nxt::RUN_ON);
\r
34 lcd.putf("snn", "Nxt");
\r
35 lcd.putf("sdnsdn", "Time[sec]: ", clock.now()/1000,0, "Batt[mV]: ", nxt.getBattMv(),0);
\r
36 lcd.putf("sdnsd", "ENTR btn: ", entrBtn,0, "RUN btn: ", runBtn,0);
\r