Add getc in C API

pull/4364/head
Azim Khan 2017-05-19 17:27:22 +01:00
parent bd5820f77c
commit 0edf082c59
2 changed files with 7 additions and 0 deletions

View File

@ -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 */

View File

@ -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;
}