NilRTOS - A Fast Tiny Preemptive RTOS

Another issue I've found - I have to use:

struct FifoItem_t {
  uint16_t usec;        // Low 16-bit of time in usec.
  uint16_t value;  // ADC value.
  uint8_t error;   // Overrun count since last point.
};

otherwise the adc value read is not correctly passed to p->value. It seems our compiler has got a problem with passing values to bitfields ..