Skip to content

Commit b31efe8

Browse files
Merge branch 'smarq8-master'
2 parents e65747d + 32d2eab commit b31efe8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

STM32F1/cores/maple/HardwareSerial.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,7 @@ int HardwareSerial::peek(void)
126126

127127
int HardwareSerial::availableForWrite(void)
128128
{
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;
129+
return this->usart_device->wb->size-rb_full_count(this->usart_device->wb);
135130
}
136131

137132
size_t HardwareSerial::write(unsigned char ch) {

0 commit comments

Comments
 (0)