linuxcnc/docs/man/man3/hm2_uart_send.3hm2
Petter Reinholdtsen ed7bade7b2 Changed to regular format for man page cross references.
Man page viewers like khelp are able to convert hostmot2(9) into a link
to the hostmot2 manual page, while they do not understand 'man hostmot2'
or similar notation.  Thus, converted references to the regular fomat used
in manual pages.
2022-09-23 08:54:00 +02:00

35 lines
1.1 KiB
Text

\# Author Andy Pugh
\# Issued under the terms of the GPL v2 License or any later version
.TH hm2_uart_send "3hm2" "2011-05-31" "LinuxCNC Documentation" "Hostmot2"
.SH NAME
hm2_uart_send \- write data to a Hostmot2 UART
.SH SYNTAX
.nf
.B #include <hostmot2-serial.h>
.HP
int hm2_uart_send(char* name, unsigned char data[], int count)
.SH DESCRIPTION
\fBhm2_uart_send\fR write 'count' bytes of data to the UART "name" from the
buffer 'data'.
The UART FIFO is 64 bytes deep, attempts to transmit more than 64 bytes may have
unexpected effects.
"name" is a unique string given to each UART during hostmot2 setup. The names of
the available channels are printed to standard output during the driver loading
process and take the form:
hm2_<board name>.<board index>.uart.<index> For example hm2_5i23.0.uart.0
This function performs writes of data to the specified UART.
It should be used inside a function in a realtime or userspace HAL component.
.SH RETURN VALUE
Returns the number of bytes sent on success and \-1 on failure.
.SH SEE ALSO
\fBhm2_uart_setup\fR(3hm2), \fBhm2_uart_read\fR(3hm2)
.TP
See src/hal/drivers mesa_uart.comp for an example usage.