@@ -67,7 +67,7 @@ class NimBLEStream : public Stream {
6767 DROP_NEW_DATA // Drop new incoming data when buffer is full
6868 };
6969
70- typedef std::function<RxOverflowAction(const uint8_t * data, size_t len, void * userArg)> rx_overflow_callback_t ;
70+ using RxOverflowCallback = std::function<RxOverflowAction(const uint8_t * data, size_t len, void * userArg)>;
7171
7272 NimBLEStream () = default ;
7373 virtual ~NimBLEStream () { end (); }
@@ -98,7 +98,7 @@ class NimBLEStream : public Stream {
9898 * @param cb The callback function, which should return DROP_OLDER_DATA to drop older buffered data and
9999 * make room for the new data, or DROP_NEW_DATA to drop the new data instead.
100100 */
101- void setRxOverflowCallback (rx_overflow_callback_t cb, void * userArg = nullptr ) {
101+ void setRxOverflowCallback (RxOverflowCallback cb, void * userArg = nullptr ) {
102102 m_rxOverflowCallback = cb;
103103 m_rxOverflowUserArg = userArg;
104104 }
@@ -125,7 +125,7 @@ class NimBLEStream : public Stream {
125125 uint32_t m_rxBufSize{1024 };
126126 ble_npl_event m_txDrainEvent{};
127127 ble_npl_callout m_txDrainCallout{};
128- rx_overflow_callback_t m_rxOverflowCallback{nullptr };
128+ RxOverflowCallback m_rxOverflowCallback{nullptr };
129129 void * m_rxOverflowUserArg{nullptr };
130130 bool m_coInitialized{false };
131131 bool m_eventInitialized{false };
0 commit comments