-
Notifications
You must be signed in to change notification settings - Fork 178
Move Serial example 3 to RawSerial #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Example three should be moved to RawSerial
Will make the necessary changes in https://os.mbed.com/teams/mbed_example/code/Serial_ex_3/
|
||
Attach a function to call during the generation of serial interrupts. This function defaults to interrupt on an RX pin. | ||
|
||
[](https://os.mbed.com/teams/mbed_example/code/Serial_ex_3/file/4ab47f33a1ae/main.cpp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looks like this example is still using the Serial class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geky Yeah, I would update that example if these docs changes get approved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And change the repo name to "RawSerial_ex_2"
@SenRamakri Are you happy for this to merge? |
@SenRamakri do you have any comments? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good..
@AnotherButler this is ready, and I've updated the example in https://os.mbed.com/teams/mbed_example/code/RawSerial_ex_2/ |
Example three in the Serial API doc attaches an interrupt to the Serial
pc
object, and inside the callback functiongetc()
andputc()
are used. As of the latest version of Mbed OS, both of these functions use mutex locks which are not allowed in ISR context, and create the following error at runtime:In order to use
getc()
andputc()
in ISR context with a serial interrupt, you need to use aRawSerial
object.If these changes get approved, I can either make a new example for RawSerial or update the existing example 3 for Serial here: https://os.mbed.com/teams/mbed_example/code/Serial_ex_3/