Serial
UART0 port of TWELITE (mwx::serial_jen)
最終更新
UART0 port of TWELITE (mwx::serial_jen)
最終更新
Implement and input/output with UART0 of TWELITE.
The Serial
object is initialized at system startup with UART0, 115200 bps, and the initialization process is performed in the library. On the user code, it is available from setup()
.
The Serial1
object is provided in the library, but no initialization process is performed; to enable UART1, perform the necessary initialization procedures Serial1.setup(), Serial1.begin()
.
Output may become unstable during setup(), wakeup()
just after startup or flush
process just before sleep.
Initialize objects.
Allocate memory for FIFO buffers for TX/RX
Allocating memory for TWE_tsFILE structure
Serial
(UART0) will automatically call setup()
in the library. There is no need for a user call.
Also, the buffer size of Serial
(UART0) is determined at compile time. You can change it by the macro MWX_SER_TX_BUFF
(768 if not specified) or MWX_SER_RX_BUFF
(256 if not specified).
buf_tx
FIFO buffer size for TX
buf_rx
FIFO buffer size for RX
Initialize hardware.
The Serial
(UART0) has an automatic begin()
call in the library. No user call is required.
speed
Specifies the baud rate of the UART.
config
When the serial_jen::E_CONF::PORT_ALT
bit is specified, UART1 is initialized with DIO14,15. If not specified, initializes UART1 with DIO11(TxD),9(RxD).
(Not implemented) Stop using hardware.
Get a structure in the TWE_tsFILE*
format used in the C library.