Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
machine.UART is the constructor of the UART object, which is used to initialize the corresponding channel and pin. D The first parameter id is to use the UART channel, which can be 0 or 1.
The second parameter baudrate is the baud rate used.
The third parameter bits is the data bit length (only 8 bits are valid at this stage).
The fourth parameter parity is whether to use the parity bit.
The fifth parameter stop is the length of the stop bit.
The sixth and seventh parameters tx and rx are transceiver pins, which should be Pin objects.
The write function, used to send a string, returns the number of bytes sent by the value. buf: Sending a string The write function is used to send a string and return the number of bytes sent. The parameter buf is the string to be sent.
The sendbreak function sends a stop signal on the bus. This will drive the bus low for longer than the normal transmission of the character takes.