diff options
Diffstat (limited to 'include/ratp.h')
-rw-r--r-- | include/ratp.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/ratp.h b/include/ratp.h new file mode 100644 index 0000000000..94fd004f45 --- /dev/null +++ b/include/ratp.h @@ -0,0 +1,22 @@ +#ifndef __RATP_H +#define __RATP_H + +struct ratp { + struct ratp_internal *internal; + int (*send)(struct ratp *, void *pkt, int len); + int (*recv)(struct ratp *, uint8_t *data); +}; + +int ratp_establish(struct ratp *ratp, bool active, int timeout_ms); +void ratp_close(struct ratp *ratp); +int ratp_recv(struct ratp *ratp, void **data, size_t *len); +int ratp_send(struct ratp *ratp, const void *data, size_t len); +int ratp_send_complete(struct ratp *ratp, const void *data, size_t len, + void (*complete)(void *ctx, int status), void *complete_ctx); +int ratp_poll(struct ratp *ratp); +bool ratp_closed(struct ratp *ratp); +bool ratp_busy(struct ratp *ratp); + +void ratp_run_command(void); + +#endif /* __RATP_H */
\ No newline at end of file |