diff options
Diffstat (limited to 'ports/stm32f4/src/stream_i2c.c')
| -rw-r--r-- | ports/stm32f4/src/stream_i2c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/stm32f4/src/stream_i2c.c b/ports/stm32f4/src/stream_i2c.c index 8c6c65b..621e11e 100644 --- a/ports/stm32f4/src/stream_i2c.c +++ b/ports/stm32f4/src/stream_i2c.c @@ -2,7 +2,7 @@ #include "port.h" #include "stream.h" -int i2c_read(uint8_t* buf, size_t count, void **vptr, void *sptr) +int read_I2C(uint8_t* buf, size_t count, void **vptr, void *sptr) { p_stream_t *stream = (p_stream_t*)sptr; I2C_HandleTypeDef dev = *(I2C_HandleTypeDef*)stream->props[0]; @@ -23,7 +23,7 @@ int i2c_read(uint8_t* buf, size_t count, void **vptr, void *sptr) return 0; } -int i2c_write(uint8_t* buf, size_t count, void **vptr, void *sptr) +int write_I2C(uint8_t* buf, size_t count, void **vptr, void *sptr) { p_stream_t *stream = (p_stream_t*)sptr; I2C_HandleTypeDef dev = *(I2C_HandleTypeDef*)stream->props[0]; @@ -32,6 +32,6 @@ int i2c_write(uint8_t* buf, size_t count, void **vptr, void *sptr) while (HAL_I2C_Master_Transmit(&dev, addr, buf, count, timeout) != HAL_OK) { return HAL_I2C_GetError(&dev); - } + } return 0; } |
