summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ratp.h22
-rw-r--r--include/ratp_bb.h15
2 files changed, 37 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
diff --git a/include/ratp_bb.h b/include/ratp_bb.h
new file mode 100644
index 0000000000..52ecaff374
--- /dev/null
+++ b/include/ratp_bb.h
@@ -0,0 +1,15 @@
+#ifndef __RATP_BB_H
+#define __RATP_BB_H
+
+struct ratp_bb_pkt {
+ struct list_head list;
+
+ unsigned int len;
+ uint8_t data[];
+};
+
+int barebox_ratp(struct console_device *cdev);
+int barebox_ratp_fs_call(struct ratp_bb_pkt *tx, struct ratp_bb_pkt **rx);
+int barebox_ratp_fs_mount(const char *path);
+
+#endif /* __RATP_BB_H */