Hello,
On Saturday, April 12, 2014 04:08:53 PM stevech wrote:
> Thanks.
>
> Is RadioHead the name of a library for multiple types of data radios and
> also not wholly AVR specific?
Yes.
It will include the message handlers from RF22:
Datagram, ReliableDatagram, Router and Mesh
and drivers for:
RF22, RF69, Serial port, ASK (using the tech from VirtualWire)
and will build for
Arduino, Maple, Uno32, maybe others.
Cheers.
>
> On Thursday, April 10, 2014 4:19:18 PM UTC-7, stevech wrote:
> > Recommended addtion to rf22.cpp. Generally useful to know when the last
> > valid preamble was received. One use is clear channel assessment (no
> > header
> > received for x amount of time).
> >
> > in the interrupt service function, at the bottom:
> > if (_lastInterruptFlags[1] & RF22_IPREAVAL)
> > {
> >
> > // Serial.println("IPREAVAL");
> >
> > _lastRssi = spiRead(RF22_REG_26_RSSI);
> > *_lastPreambleTime = millis(); // <<< ADDED THIS*
> > clearRxBuf();
> > }
> >
> > the call to millis() is likely* always_inline* and low overhead.
> >
> > and added
> >
> > _lastPreambleTime in the .h as a uint32_t (sizeof millis())
> >
> > and a "getter" function for this, like
> >
> > uint32_t get_lastPreambleTime(void); // in .h
> > and
> >
> > uint32_t get_lastPreambleTime(void) {
> >
> > return(_lastPreambleTime);
> >
> > }