Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 6 months ago.
Serial Even Parity setting
mmlink.format( 8, Serial::Even, 1);
This fragment of code compiled with Rev 43 of the mbed library, with Rev 45 I get the error:-
Class "mbed::Serial" has no member "Even"
This seems to be the case for all the Parity setting.
Am I missing something at Rev 45?
Tim
3 Answers
10 years, 6 months ago.
You dont have to add anything, rename "Even" to "ParityEven". Just a name change. Btw @ mbed people, you need to update documentation of serial class, format function doesnt give those new names.
10 years, 6 months ago.
As part of the complete refactoring of the mbed library we moved the parameter type definitions from the C++ API to the C API. The missing parity enum has been moved from Serial.h
to serial_api.h
: serial_api.h
10 years, 6 months ago.
You've lost me again, how do I use this serial_api.h, simply adding to my .cpp file still does not get rid of the compiler error.
Soo, this is still not fixed as I tried everything to set the mode to Parity Even. Nothing worked. Can someone post the code for setting up format(8bit, parityeven, 1 stopbit)? thanks
posted by Swedgin . 26 Oct 2015I' m hitting the same block here
Wether I use -Even, -even, -ParityEven, -E
I can' t get code to compile without the mentioned error
posted by Marout Yasuo Sluijter-Borms 18 Feb 2017