File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -122,25 +122,7 @@ void SerialDispatcher::flush()
122
122
123
123
size_t SerialDispatcher::write (uint8_t const b)
124
124
{
125
- mbed::ScopedLock<rtos::Mutex> lock (_mutex);
126
-
127
- auto iter = findThreadCustomerDataById (rtos::ThisThread::get_id ());
128
-
129
- /* If this thread hasn't registered yet
130
- * with the SerialDispatcher via 'begin'.
131
- */
132
- if (iter == std::end (_thread_customer_list))
133
- return 0 ;
134
-
135
- if (iter->tx_buffer .availableForStore ())
136
- iter->tx_buffer .store_char (b);
137
-
138
- /* Inform the worker thread that new data has
139
- * been written to a Serial transmit buffer.
140
- */
141
- _cond.notify_one ();
142
-
143
- return 1 ;
125
+ return write (&b, 1 );
144
126
}
145
127
146
128
size_t SerialDispatcher::write (const uint8_t * data, size_t len)
You can’t perform that action at this time.
0 commit comments