.\"******************************************************************* .\" .\" This file was extracted from hal/components/mesa_pktgyro_test.comp using halcompile.g. .\" Modify the source file. .\" .\"******************************************************************* .TH MESA_PKTGYRO_TEST "9" "2023-02-10" "LinuxCNC Documentation" "HAL Component" .SH NAME mesa_pktgyro_test \- PktUART simple test with Microstrain 3DM-GX3-15 gyro .SH SYNOPSIS .HP .B loadrt mesa_pktgyro_test [count=\fIN\fB|names=\fIname1\fB[,\fIname2...\fB]] .SH DESCRIPTION This component is written in order to test the PktUART driver for Mesa. It resembles partly Andy Pugh's mesa_uart.comp . This module uses the names= mode of loadrt declaration to specify which PktUART instances to enable. A check is included to ensure that the count= option is not used instead. For simplicity we test only one PktUART instance, therefore load the component like this: \fB loadrt mesa_uart names=hm2_5i25.0.pktuart.0\fR The PktUART instance names are printed to the dmesg buffer during the Hostmot2 setup sequence, one for each PktUART instance included in the bitfile loaded to each installed card during the Hostmot2 setup sequence. Type "dmesg" at the terminal prompt to view the output. If you want to work with more than one PktUART instance, consult Andy Pugh's mesa_uart.comp In order to compile and install do: \fB halcompile --install src/hal/drivers/mesa_pktgyro_test.comp\fR The component exports only one function, namely receive, which needs to be added to a realtime thread. To test this component set DEBUG=5 before and execute this HAL script: \fB loadrt hostmot2\fR \fB loadrt hm2_pci\fR \fB loadrt mesa_pktgyro_test names=hm2_5i25.0.pktuart.0\fR \fB loadrt threads name1=test1 period1=10000000\fR \fB addf hm2_5i25.0.pktuart.0.receive test1\fR \fB start\fR Check linuxcnc.log for debug output. .SH FUNCTIONS .TP \fBmesa-pktgyro-test.\fIN\fB.receive\fR (requires a floating-point thread) .SH PINS .TP .B mesa-pktgyro-test.\fIN\fB.rxbytes\fR s32 out \fR Number of Bytes received or negative Error code .SH AUTHOR Boris Skegin .SH LICENSE GPL