36 |
36 |
37 private: |
37 private: |
38 void pushCmd(uint8_t cmd, uint8_t size, char *payload); |
38 void pushCmd(uint8_t cmd, uint8_t size, char *payload); |
39 void rxIrq(void); |
39 void rxIrq(void); |
40 void timeout(void); |
40 void timeout(void); |
41 void set_timer(float v=0.0) { |
41 void set_timer(Kernel::Clock::duration_u32 v=0ms) { |
42 timeouter.detach(); |
42 timeouter.detach(); |
43 if (v > 0.0) |
43 if (v > 0ms) |
44 timeouter.attach(callback(this, &HPSerial::timeout), v); |
44 timeouter.attach(callback(this, &HPSerial::timeout), v); |
45 } |
45 } |
46 |
46 |
47 private: |
47 private: |
48 UnbufferedSerial serial; |
48 UnbufferedSerial serial; |