---
name: "mesa_pktgyro_test"
section: "9"
platform: "linux"
package: "linuxcnc-uspace"
version: "1:2.9.4-2+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mesa_pktgyro_test"
---

# mesa\_pktgyro\_test(9)

PktUART simple test with Microstrain 3DM-GX3-15 gyro

## NAME

mesa\_pktgyro\_test - PktUART simple test with Microstrain 3DM-GX3-15 gyro

## SYNOPSIS

**loadrt mesa\_pktgyro\_test \[count=*N*\|names=*name1*\[,*name2...*\]\]**

## 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:

 **loadrt mesa\_uart names=hm2\_5i25.0.pktuart.0**

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:  **halcompile --install src/hal/drivers/mesa\_pktgyro\_test.comp**

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:  **loadrt hostmot2**  **loadrt hm2\_pci**  **loadrt mesa\_pktgyro\_test names=hm2\_5i25.0.pktuart.0**  **loadrt threads name1=test1 period1=10000000**  **addf hm2\_5i25.0.pktuart.0.receive test1**  **start**

Check linuxcnc.log for debug output.

## FUNCTIONS

- **mesa-pktgyro-test.***N***.receive** (requires a floating-point thread)

  ## PINS

- **mesa-pktgyro-test.*N*.rxbytes s32 out**

  Number of Bytes received or negative Error code

## AUTHOR

Boris Skegin

## LICENSE

GPL
