You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.7 KiB
EmacsLisp

;;; serial-terminator.el --- Allows for the creation of one or more serial terminals, each existing in their own buffer + window combo. -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Penguin
;; Author: Penguin <penguin@epenguin.net>
;; Keywords: terminals
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(provide 'serial-terminator)
;;; serial-terminator.el ends here
(require 'evil)
(defun quad-serial-term-setup ()
"Opens 4 buffers in a 2x2 square, then opens serial ports in each one"
(interactive)
(ansi-term "/bin/zsh" "/dev/ttyUSB0")
(evil-window-split)
(ansi-term "/bin/zsh" "/dev/ttyUSB1")
(evil-window-vsplit)
(ansi-term "/bin/zsh" "/dev/ttyUSB2")
(evil-window-down 1)
(evil-window-vsplit)
(ansi-term "/bin/zsh" "/dev/ttyUSB3")
(comint-send-string "*/dev/ttyUSB0*" "minicom -D /dev/ttyUSB0 -b 115200\n")
(comint-send-string "*/dev/ttyUSB1*" "minicom -D /dev/ttyUSB1 -b 115200\n")
(comint-send-string "*/dev/ttyUSB2*" "minicom -D /dev/ttyUSB2 -b 115200\n")
(comint-send-string "*/dev/ttyUSB3*" "minicom -D /dev/ttyUSB3 -b 115200\n"))
(provide 'quad-serial-term)
;;; quad-serial-term.el ends here