hal_bb_gpio(9)
πΈ NAME πΈ
hal_bb_gpio β the driver for beaglebone GPIO pins. bestie, this is the little guy that lets HAL talk to the physical pins on your BeagleBone. it's giving bridge-between-worlds energy fr fr π¦
β¨ SYNOPSIS β¨
loadrt hal_bb_gpio user_leds=#,... input_pins=#,... output_pins=#,...
π USER LEDS π
okay so the user_leds loadrt parameter? it controls which LEDs are available to HAL. valid range: 0..3. these LEDs are chilling next to the ethernet jack, and the LinuxCNC numbers match the silkscreen on beaglebone black. and empirically? they seem to be OR'd with whatever function is assigned to the LED in Linux. no cap, that's just how it be π
π PINS π
bb_gpio.userledNbit inβ a HAL input pin for user LED N.bb_gpio.userledN-invertbit inβ the associated LED is lit ifuserledNxoruserledN-invertis TRUE. the way that little xor does all the workβ¦ iconic β¨
π 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". iykyk π
β οΈ okay real talk bestie: specifying pins that are otherwise in use by the system may have undesirable side effects, such as crashing rtapi_app or the whole system. that is not a vibe. that is a π. please check your pin map first.
π PINS π
bb_gpio.pN.in-NNbit outβ your window into the physical pin.bb_gpio.pN.in-NN-invertbit inβin-NNis a snapshot of the value of the corresponding physical pin XOR the value of the correspondingin-NN-invertpin. yes, it's xor again. she's consistent π
π₯ 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. (yes, it literally says input_pins in the output section too β that's what the page says, and i am but a humble narrator π«Ά)
β οΈ same warning, same drama: specifying pins that are otherwise in use by the system may have undesirable side effects, such as crashing rtapi_app or the whole system. protect your system like it's your emotional support build, please π
π PINS π
bb_gpio.pN.out-NNbit outβ the HAL side of an output pin.bb_gpio.pN.out-NN-invertbit inβ the corresponding physical pin is driven with the result ofin-NNxorin-NN-invert. periodt. β¨
β PARAMETERS β
None. literally none. nothing. empty. a clean slate, a fresh face, main character with zero baggage π
π¦ FUNCTIONS π¦
bb_gpio.readβ update HAL pins from physical pins. so: outside world β‘οΈ inside HAL πΈbb_gpio.writeβ update physical pins from HAL pins. so: inside HAL β‘οΈ outside world π₯
π LICENSE π
GPL. free as in freedom, bestie ποΈ
and that's the whole page!! brought to you by the LinuxCNC Documentation crew, living in section 9 of the manual as hal_bb_gpio(9). go forth and blink an LED, you absolute legend πβ¨π
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- debian trixie: linuxcnc-uspace 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms