diff options
| author | Aditya Naik | 2020-08-03 15:58:11 -0400 |
|---|---|---|
| committer | Aditya Naik | 2020-08-03 15:58:11 -0400 |
| commit | 8e1133fcf30fbb4e1d406c47cb87d592c9742c4f (patch) | |
| tree | 69566540b2a56ac920eef07bb27d1f03fc60e565 /ports/posix/src | |
| parent | 11a52e4e88bcad1e6bddcf02f78e1cc5eaaec508 (diff) | |
Handshake works in a thread without a set priority. Need a stdio stream pointer to individual files representing individual devices
Diffstat (limited to 'ports/posix/src')
| -rw-r--r-- | ports/posix/src/port.h | 15 | ||||
| -rw-r--r-- | ports/posix/src/stream_stdio.c | 6 |
2 files changed, 20 insertions, 1 deletions
diff --git a/ports/posix/src/port.h b/ports/posix/src/port.h new file mode 100644 index 0000000..01d1fb1 --- /dev/null +++ b/ports/posix/src/port.h @@ -0,0 +1,15 @@ +/** + * + * @brief Port specific includes go in this file + * +*/ + +#ifndef __PORT_H +#define __PORT_H + +#include <pthread.h> +#include <mqueue.h> +#include <stdint.h> +#include <errno.h> + +#endif diff --git a/ports/posix/src/stream_stdio.c b/ports/posix/src/stream_stdio.c index efa4b13..ed83e7b 100644 --- a/ports/posix/src/stream_stdio.c +++ b/ports/posix/src/stream_stdio.c @@ -13,6 +13,10 @@ int stdio_read(uint8_t* buf, size_t count, void **vptr, void *sptr) int stdio_write(uint8_t* buf, size_t count, void **vptr, void *sptr) { - printf("%s\n", buf); + int x; + for (x = 0; x < count; x++) { + printf("%x", buf[x]); + } + printf("\n"); return 0; } |
