---
name: "hal_bb_gpio"
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/hal_bb_gpio"
---

# hal\_bb\_gpio(9)

Driver for beaglebone GPIO pins

## NAME

hal\_bb\_gpio - Driver for beaglebone GPIO pins

## SYNOPSIS

**loadrt hal\_bb\_gpio *user\_leds=#,...* *input\_pins=#,...* *output\_pins=#,...***

## USER LEDS

The *user\_leds* loadrt parameter controls which LEDs are available to HAL. Valid range: 0..3.  These LEDs are next to the ethernet jack and the LinuxCNC numbers match the silkscreen on beaglbone black.  Empirically, these seem to be OR'd with whatever function is assigned to the LED in Linux.

### PINS

- **bb\_gpio.userled***N* bit in **bb\_gpio.userled***N***-invert** bit in

  The associated LED is lit if **userled***N* xor **userled***N*-invert **is TRUE.**

## INPUT PINS

**The** *input\_pins* loadrt parameter controls which physical I/O pins are available to HAL as input pins.  The numbering is "800+N" for pin N on connector P8, and "900+N" for pin N on connector P9.  For example, "803" means connector P8 pin 3, which is also described in BeagleBone documentation as "gpmc\_ad6".

Specifying pins that are otherwise in use by the system may have undesirable side effects, such as crashing rtapi\_app or the whole system.

### PINS

- **bb\_gpio.p***N***.in-***NN* bit out **bb\_gpio.p***N***.in-***NN***-invert** bit in

  **in-***NN* is a snapshot of the value of the corresponding physical pin XOR the value of the corresponding **in-***NN***-invert** pin.

## OUTPUT PINS

The *input\_pins* loadrt parameter controls which physical I/O pins are available to HAL as input pins.  The numbering is "800+N" for pin N on connector P8, and "900+N" for pin N on connector P9.

Specifying pins that are otherwise in use by the system may have undesirable side effects, such as crashing rtapi\_app or the whole system.

### PINS

- **bb\_gpio.p***N***.out-***NN* bit out **bb\_gpio.p***N***.out-***NN***-invert** bit in

  The corresponding physical pin is driven with the result of **in-***NN* xor **in-***NN***-invert**.

## PARAMETERS

None

## FUNCTIONS

- **bb\_gpio.read**

  Update HAL pins from physical pins.

- **bb\_gpio.write**

  Update physical pins from HAL pins.

## LICENSE

GPL
