adafruit / Adafruit_BluefruitLE_nRF51

Arduino library for nRF51822-based Adafruit Bluefruit LE modules
197 stars 122 forks source link

Added methods for checking the FIFO buffer #20

Open rubberduck203 opened 7 years ago

rubberduck203 commented 7 years ago

I added a few convenience methods for checking the remaining FIFO buffer. I've a use case where extremely low latency is more important than making sure every packet is sent, so I found myself needing to check make sure that there's enough room in the buffer to ensure I don't pay the 200ms penalty for over-running it, as described here.

The change is just a wrapper around the AT+BLEUARTFIFO command. I'm not a fan of using strings when I can wrap a command like this with code. There are other implementations of AT commands in the Adafruit_BLE class, so it seemed to fit in there.