 }
 
 public enum UARTSpeed {
+    case S2400
+    case S4800
     case S9600
     case S19200
     case S38400


    public func configure(_ cfg: inout termios) {
        switch self {
        case .S9600:
            cfsetispeed(&cfg, speed_t(B9600))
            cfsetospeed(&cfg, speed_t(B9600))

    var fd: Int32

    public init?(_ uartId: String) {
        device = "/dev/"+uartId
        tty = termios()

        fd = open(device, O_RDWR | O_NOCTTY | O_SYNC | O_NONBLOCK)
        guard fd>0 else {
            perror("Couldn't open UART device")
            abort()
