We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e65747d + f781964 commit 32d2eabCopy full SHA for 32d2eab
STM32F1/cores/maple/HardwareSerial.cpp
@@ -126,12 +126,7 @@ int HardwareSerial::peek(void)
126
127
int HardwareSerial::availableForWrite(void)
128
{
129
-/* Roger Clark.
130
- * Currently there isn't an output ring buffer, chars are sent straight to the hardware.
131
- * so just return 1, meaning that 1 char can be written
132
- * This will be slower than a ring buffer implementation, but it should at least work !
133
- */
134
- return 1;
+ return this->usart_device->wb->size-rb_full_count(this->usart_device->wb);
135
}
136
137
size_t HardwareSerial::write(unsigned char ch) {
0 commit comments