linuxcnc/docs/man/man3/hm2_bspi_set_read_function.3hm2
Sebastian Kuzminsky 4a897203bc docs: fix hyphen/minus confusion in manpages
groff treats '-' (the character you get when you hit the "minus" key on
the keyboard) as "hyphen", not as "minus".  Thus it renders incorrectly
in some locales, and line-wraps strangely.

groff treats the two-character sequence "\-" as "minus", and the
four-character sequence "\(hy" as "hyphen".

Details here: https://lists.debian.org/debian-devel/2003/03/msg01481.html

This commit replaces every instance of "-" in our manpages where the
meaning is "minus" with "\-", so it works right.

This fixes many lintian warnings.
2018-01-18 08:12:31 -07:00

43 lines
1.7 KiB
Text

\# Author Andy Pugh
\# Issued under the terms of the GPL v2 License or any later version
.TH hm2_bspi_set_read_function "3hm2" "2011-05-31" "LinuxCNC Documentation" "Hostmot2"
.SH NAME
hm2_bspi_set_read_function \- Register a function to handle the tram write phase
of a hostmot2 buffered SPI driver.
.SH SYNTAX
.HP
int hm2_bspi_set_read_function(char *name, void *func, void *subdata)
.SH DESCRIPTION
\fBhm2_bspi_set_read_function\fR registers a function in an external driver
to be called every time that the main Hostmot2
driver calls the generic "process_tram_read" function.
The names of the available channels are printed with rtapi_print_msg during the
driver loading process and take the form:
.RS
hm2_<board name>.<board index>.bspi.<index>
.RE
For example hm2_5i23.0.bspi.0.
"func" should be a pointer to a function in the sub driver which is to be
called to process the results of the BSPI TRAM read phase. The function must
take a single argument, a pointer to an individual instance of the internal
driver. If defined in comp then the function must \fBnot\fP use the FUNCTION()
convenience macro, and the argument to the function in the definition must
\fBalways\fP be (struct state *inst).
"subdata" is a pointer to the driver instance internal data. In the case of a
driver written in comp this will always be "inst" in the function call and the
call should be anywhere in the EXTRA_SETUP code.
.SH RETURN VALUE
Returns 0 on success and \-1 on failure.
.SH SEE ALSO
\fBhm2_bspi_setup_chan(3hm2)\fR,
\fBhm2_bspi_write_chan(3hm2)\fR,
\fBhm2_tram_add_bspi_frame(3hm2)\fR,
\fBhm2_allocate_bspi_tram(3hm2)\fR,
src/hal/drivers mesa_7i65.comp in the LinuxCNC source distribution.