diff options
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/posix/src/stream_stdio.c | 13 | ||||
| -rw-r--r-- | ports/stm32f4/src/port.h | 3 | ||||
| -rw-r--r-- | ports/stm32f4/src/stream_i2c.c | 2 |
3 files changed, 17 insertions, 1 deletions
diff --git a/ports/posix/src/stream_stdio.c b/ports/posix/src/stream_stdio.c index ed83e7b..e9b6f09 100644 --- a/ports/posix/src/stream_stdio.c +++ b/ports/posix/src/stream_stdio.c @@ -1,6 +1,19 @@ #include <stdio.h> +#include <stdlib.h> #include "stream_stdio.h" #include "stream.h" +#include "main.h" + +int stdio_init(void **vptr, void *sptr) +{ + /* TODO */ + /* p_stream_t *stream = (p_stream_t*)sptr; */ + /* int num_files = BUS_DEVICE_LIMIT; */ + /* int x; */ + /* char fname_base[] = "devio_", fname[10]; */ + + return 0; +} int stdio_read(uint8_t* buf, size_t count, void **vptr, void *sptr) { diff --git a/ports/stm32f4/src/port.h b/ports/stm32f4/src/port.h index ffbbe9e..cb55268 100644 --- a/ports/stm32f4/src/port.h +++ b/ports/stm32f4/src/port.h @@ -9,4 +9,7 @@ #include "stm32f4xx_hal.h" +#define led_Pin GPIO_PIN_13 +#define led_GPIO_Port GPIOC + #endif diff --git a/ports/stm32f4/src/stream_i2c.c b/ports/stm32f4/src/stream_i2c.c index 3e8fc95..8c6c65b 100644 --- a/ports/stm32f4/src/stream_i2c.c +++ b/ports/stm32f4/src/stream_i2c.c @@ -19,7 +19,7 @@ int i2c_read(uint8_t* buf, size_t count, void **vptr, void *sptr) else if (++AF_counter > AF_limit) { return HAL_I2C_ERROR_AF; } - } + } return 0; } |
