improve adafruit fifo
This commit is contained in:
1 parent
2e1977d71f
commit
0cbbe8f291
5 files changed
+6
-6
No files matched your search
@@ -47,8 +47,8 @@
|
||||
Number of bytes of each item
|
||||
*/
|
||||
/******************************************************************************/
|
||||
Adafruit_FIFO::Adafruit_FIFO(uint16_t depth, uint8_t item_size)
|
||||
: _depth(depth), _item_size(item_size)
|
||||
Adafruit_FIFO::Adafruit_FIFO(uint8_t item_size, uint16_t depth)
|
||||
: _item_size(item_size), _depth(depth)
|
||||
{
|
||||
_buffer= NULL;
|
||||
_mutex = NULL;
|
||||
|
||||
@@ -59,7 +59,7 @@ class Adafruit_FIFO
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Adafruit_FIFO(uint16_t depth, uint8_t item_size);
|
||||
Adafruit_FIFO(uint8_t item_size, uint16_t depth);
|
||||
|
||||
virtual ~Adafruit_FIFO();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ void bleuart_central_notify_cb(BLEClientCharacteristic& chr, uint8_t* data, uint
|
||||
|
||||
BLEClientUart::BLEClientUart(uint16_t fifo_depth)
|
||||
: BLEClientService(BLEUART_UUID_SERVICE), _txd(BLEUART_UUID_CHR_TXD), _rxd(BLEUART_UUID_CHR_RXD),
|
||||
_rx_fifo(fifo_depth, 1)
|
||||
_rx_fifo(1, fifo_depth)
|
||||
{
|
||||
_rx_cb = NULL;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ void blemidi_write_cb(BLECharacteristic& chr, uint8_t* data, uint16_t len, uint1
|
||||
/* IMPLEMENTATION
|
||||
*------------------------------------------------------------------*/
|
||||
BLEMidi::BLEMidi(uint16_t fifo_depth)
|
||||
: BLEService(BLEMIDI_UUID_SERVICE), _io(BLEMIDI_UUID_CHR_IO), _rxd_fifo(fifo_depth, 1)
|
||||
: BLEService(BLEMIDI_UUID_SERVICE), _io(BLEMIDI_UUID_CHR_IO), _rxd_fifo(1, fifo_depth)
|
||||
{
|
||||
_write_cb = NULL;
|
||||
_midilib_obj = NULL;
|
||||
|
||||
@@ -65,7 +65,7 @@ const uint8_t BLEUART_UUID_CHR_TXD[] =
|
||||
*/
|
||||
BLEUart::BLEUart(uint16_t fifo_depth)
|
||||
: BLEService(BLEUART_UUID_SERVICE), _txd(BLEUART_UUID_CHR_TXD), _rxd(BLEUART_UUID_CHR_RXD),
|
||||
_rxd_fifo(fifo_depth, 1)
|
||||
_rxd_fifo(1, fifo_depth)
|
||||
{
|
||||
_rx_cb = NULL;
|
||||
|
||||
|
||||
Reference in new issue
Block a user