mirror of https://github.com/ARMmbed/mbed-os.git
Add getc in C API
parent
bd5820f77c
commit
0edf082c59
|
@ -28,6 +28,7 @@ void GREENTEA_SETUP_C(const int timeout, const char * host_test);
|
|||
void greentea_send_kv_c(const char * key, const char * val);
|
||||
int greentea_parse_kv_c(char * key, char * val,
|
||||
const int key_len, const int val_len);
|
||||
char greentea_getc();
|
||||
|
||||
#endif /* TEST_ENV_C_H */
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "greentea-client/greentea_serial.h"
|
||||
|
||||
|
||||
/**
|
||||
|
@ -37,3 +38,8 @@ extern "C" int greentea_parse_kv_c(char * key, char * val,
|
|||
return greentea_parse_kv(key, val, key_len, val_len);
|
||||
};
|
||||
|
||||
extern "C" char greentea_getc() {
|
||||
char c = greentea_serial->getc();
|
||||
return c;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue