aboutsummaryrefslogtreecommitdiff
path: root/src/net/ps1
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-09-24 06:42:02 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-09-24 06:42:02 +0200
commit04415b025e6bd25bc2eb5cb5f33003efa7f29106 (patch)
treec6ed3265bf3413c7753b89bf27197cb274d7b835 /src/net/ps1
parent11a12ad316b3314aceb8a08b1332c4571111459c (diff)
downloadjancity-04415b025e6bd25bc2eb5cb5f33003efa7f29106.tar.gz
net: Relocate source files for consistency
Diffstat (limited to 'src/net/ps1')
-rw-r--r--src/net/ps1/src/net.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/net/ps1/src/net.c b/src/net/ps1/src/net.c
new file mode 100644
index 0000000..8c037f3
--- /dev/null
+++ b/src/net/ps1/src/net.c
@@ -0,0 +1,60 @@
+#include <net.h>
+#include <net/serial.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stddef.h>
+
+int net_read(struct net_socket *const h, void *const buf, const size_t n)
+{
+ return -1;
+}
+
+int net_write(struct net_socket *const h, const void *const buf, const size_t n)
+{
+ return -1;
+}
+
+int net_close(struct net_socket *const h)
+{
+ return -1;
+}
+
+int net_update(struct net_socket *const h)
+{
+ return -1;
+}
+
+struct net_socket *net_connect(const union net_connect *const c)
+{
+ return NULL;
+}
+
+struct net_socket *net_server(const union net_server *const c)
+{
+ return NULL;
+}
+
+int net_init(void)
+{
+ return 0;
+}
+
+void net_deinit(void)
+{
+}
+
+bool net_available(const enum net_domain d)
+{
+ return d == NET_DOMAIN_SERIAL;
+}
+
+const char *const *net_serial_devices(size_t *const n)
+{
+ static const char *const dev[] =
+ {
+ "PS1 port"
+ };
+
+ *n = sizeof dev / sizeof *dev;
+ return dev;
+}