#ifndef WASME_UART_DRIVER_H
#define WASME_UART_DRIVER_H
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef int32_t uart_init_f(const void *ctx, uint32_t dev, uint32_t baud, int32_t sda, int32_t scl);
typedef int32_t uart_deinit_f(const void *ctx, int32_t handle);
typedef int32_t uart_write_f(const void *ctx, int32_t handle, uint32_t flags, uint8_t *data_out, uint32_t length_out);
typedef int32_t uart_read_f(const void *ctx, int32_t handle, uint32_t flags, uint8_t *data_in, uint32_t length_in);
typedef struct {
uart_init_f *init;
uart_deinit_f *deinit;
uart_write_f *write;
uart_read_f *read;
} uart_drv_t;
#ifdef __cplusplus
}
#endif
#endif