init(_:baudRate:parity:stopBits:dataBits:readBufferLength:)

Initializes an interface for UART communication.

UART.swift:121
init(_ idName: Id, baudRate: Int = 115200, parity: Parity = .none, stopBits: StopBits = .oneBit, dataBits: DataBits = .eightBits, readBufferLength: Int = 1024)

Parameters

idName

REQUIRED Name/label for a physical pin which is associated with the UART peripheral. See Id for the board in MadBoards library for reference.

baudRate

OPTIONALThe communication speed. The default baud rate is 115200.

parity

OPTIONALThe parity bit to confirm the accuracy of the data transmission, .none by default.

stopBits

OPTIONALThe bits reserved to stop the communication, .oneBit by default.

dataBits

OPTIONALThe length of the data being transmitted, .eightBits by default.

readBufferLength

OPTIONALThe length of the serial buffer to store the data, 1024 by default.