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.userledN bit in β€” a HAL input pin for user LED N.
  • bb_gpio.userledN-invert bit in β€” the associated LED is lit if userledN xor userledN-invert is 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-NN bit out β€” your window into the physical pin.
  • bb_gpio.pN.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. 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-NN bit out β€” the HAL side of an output pin.
  • bb_gpio.pN.out-NN-invert bit in β€” the corresponding physical pin is driven with the result of in-NN xor in-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 πŸ’–βœ¨πŸŽ€