summaryrefslogtreecommitdiffstats
path: root/sw/linux
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-03-05 22:26:57 +0100
committerNao Pross <naopross@thearcway.org>2017-03-05 22:26:57 +0100
commit5ee822c3eb28d0fe1081e4c7b2f49d5584d9e608 (patch)
treedd8152238d1d43036e4a3b00397ad3428986e3f1 /sw/linux
parentdoc: added L7805ACV datasheet; hw: updated scheme (diff)
parentMerge branch 'master' of ssh://git.thearcway.org:2222/naopross/z80uPC (diff)
downloadz80uPC-5ee822c3eb28d0fe1081e4c7b2f49d5584d9e608.tar.gz
z80uPC-5ee822c3eb28d0fe1081e4c7b2f49d5584d9e608.zip
Merge branch 'master' of https://git.thearcway.org/git/naopross/z80uPC
Diffstat (limited to 'sw/linux')
-rw-r--r--sw/linux/config.h26
-rw-r--r--sw/linux/src/serial.c20
-rwxr-xr-xsw/linux/src/z80progbin0 -> 34688 bytes
3 files changed, 46 insertions, 0 deletions
diff --git a/sw/linux/config.h b/sw/linux/config.h
new file mode 100644
index 0000000..d319f43
--- /dev/null
+++ b/sw/linux/config.h
@@ -0,0 +1,26 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Name of package */
+#define PACKAGE "z80prog"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "naopross@tharcway.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "z80prog"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "z80prog 0.1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "z80prog"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.1"
+
+/* Version number of package */
+#define VERSION "0.1"
diff --git a/sw/linux/src/serial.c b/sw/linux/src/serial.c
index a13ef45..564676b 100644
--- a/sw/linux/src/serial.c
+++ b/sw/linux/src/serial.c
@@ -16,7 +16,27 @@ int serial_connect(const char *devpath, long baudrate)
return -1;
}
+ // TODO: update UI or add support for custom baudrate
// cfsetospeed(&tty,
+ // cfsetispeed(&tty,
+
+ tty.c_cflag &= ~PARENB; // no parity
+ tty.c_cflag &= ~CSTOPB; // no stop bit
+ tty.c_cflag |= CS8; // 8 bit data
+ tty.c_cflag &= ~CRTSCTS; // no flow control
+
+ tty.c_lflag = 0; // no signaling chars, no echo, no canonical processing
+ tty.c_oflag = 0; // no remapping, no delays
+ tty.c_cc[VMIN] = 0; // no block read
+ tty.c_cc[VTIME] = .5; // .5 seconds read timeout
+
+ tty.c_cflag |= CREAD | CLOCAL; // turn on read and ignore ctrl lines
+ tty.c_iflag &= ~(IXON | IXOFF | IXANY); // turn off s/w flow ctrl
+ tty.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // make raw
+ tty.c_oflag &= ~OPOST; // make raw
+
+ tcflush(fd , TCIFLUSH);
+ // if (tcsetaddr(
return fd;
}
diff --git a/sw/linux/src/z80prog b/sw/linux/src/z80prog
new file mode 100755
index 0000000..878683b
--- /dev/null
+++ b/sw/linux/src/z80prog
Binary files differ