Re-write the greentea_send_kv() functions to replace the use of printf,#14
Merged
PrzemekWirkus merged 1 commit intoARMmbed:masterfrom Jun 7, 2016
Merged
Re-write the greentea_send_kv() functions to replace the use of printf,#14PrzemekWirkus merged 1 commit intoARMmbed:masterfrom
PrzemekWirkus merged 1 commit intoARMmbed:masterfrom
Conversation
with a set of underlying functions to write the preamble, postamble, strings and integer values, directly to the serial port (for target to host comms) using the mbed-os Rawserial class. Raw serial can be used safely from within and interrupt context, whereas printf cannot. Thus this change allows key/values to be written to the host from within interrupt context. Added instantiation of the Rawserial class, greentea_serial Added new functions: greentea_write_preamble() greentea_write_postamble() greentea_write_string() greentea_write_int() This is an internal change only within greentea_client and does not affect the user use of greentea_send_kv().
Collaborator
Author
|
@PrzemekWirkus @mazimkhan please review |
| * \param val - integer value | ||
| * | ||
| */ | ||
| #define MAX_INT_STRING_LEN 15 |
Contributor
There was a problem hiding this comment.
const int MAX_INT_STRING_LEN = 16;
Contributor
|
+1 |
Contributor
|
@0xc0170 Can you check if we are using |
Contributor
|
@0xc0170 I will merge this PR but if you have any doubts, please let me know :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
with a set of underlying functions to write the preamble, postamble,
strings and integer values, directly to the serial port (for target to host comms)
using the Rawserial class. Raw serial can be used safely from
within an interrupt context, whereas printf cannot. Thus this change
allows key/values to be written to the host from within interrupt context.
Added instantiation of the Rawserial class, greentea_serial
Added new functions:
greentea_write_preamble()greentea_write_postamble()greentea_write_string()greentea_write_int()This is an internal change only within greentea-client and does not affect
the user use of
greentea_send_kv().