Skip to content

Commit

Permalink
docstrings: Minor fix in documented define name. (#246)
Browse files Browse the repository at this point in the history
The `CODAL_SERIAL_IN_USE` macro does not exist, the `codal-core`
`Serial::redirect()` method returns `DEVICE_SERIAL_IN_USE` instead.

https://github.com/lancaster-university/codal-core/blob/a45ede432a646a0af86fbd89d9dd692689fb6fbd/source/driver-models/Serial.cpp#L842

Fixes #238
  • Loading branch information
microbit-carlos authored Jan 25, 2023
1 parent 78d1269 commit 3f551e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions inc/compat/MicroBitSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class MicroBitSerial : public NRF52Serial
*
* @param rx the new reception pin.
*
* @return CODAL_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
* @return DEVICE_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
*/
int redirect(PinName tx, PinName rx);

Expand All @@ -121,7 +121,7 @@ class MicroBitSerial : public NRF52Serial
*
* @param rx the new reception pin.
*
* @return CODAL_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
* @return DEVICE_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
*/
int redirect(PinNumber tx, PinNumber rx);

Expand Down
4 changes: 2 additions & 2 deletions source/compat/MicroBitSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ MicroBitSerial::MicroBitSerial(PinNumber tx, PinNumber rx, uint8_t rxBufferSize,
*
* @param rx the new reception pin.
*
* @return CODAL_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
* @return DEVICE_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
*/
int MicroBitSerial::redirect(PinName tx, PinName rx) {
static Pin *oldRx = NULL;
Expand All @@ -134,7 +134,7 @@ int MicroBitSerial::redirect(PinName tx, PinName rx) {
*
* @param rx the new reception pin.
*
* @return CODAL_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
* @return DEVICE_SERIAL_IN_USE if another fiber is currently transmitting or receiving, otherwise DEVICE_OK.
*/
int MicroBitSerial::redirect(PinNumber tx, PinNumber rx) {
static Pin *oldRx = NULL;
Expand Down

0 comments on commit 3f551e2

Please sign in to comment.