= hal_pi_gpio(9) == NAME hal_pi_gpio - enable gpio pins on Raspberry Pi single board computers == SYNOPSIS *loadrt hal_pi_gpio dir*=directionBitField *exclude*=exclusionBitField == DESCRIPTION *hal_pi_gpio* is a realtime Hal component that exposes gpio pins of a RaspberryPi SBC. The device must use the BCM2835 chip, so these models should work Models A, B, B+, the Compute Module, and the Raspberry Pi Zero. Only inputs and output pins are managed by *hal_pi_gpio*. The driver refers to the pins by their *gpio* number, not by the SBC header pin number. NB: The Raspberry Pi is a 3.3V device. This means it can not tolerate 5V on any of its pins == OPTIONS *dir*=directionBitField Sets the direction of the used pins as Input or Output. The *directionBitField* is a decimal number that, in binary, is large enough to describe the pins used. The binary representation of *dir* will have a '1' for an *output* and '0' for an *input*. *exclude*=exclusionBitField Excludes pins from being managed by *hal_pi_gpio*. Some pins may be excluded, leaving them available for other purposes ( maybe I2C or SPI or ... ). This bitfield marks pins as excluded from *hal_pi_gpio*. A '1' in the bitfield means excluded, a '0' means the pin is to be managed by *hal_pi_gpio*. These bitfileds can be daunting, so user 'twoflowers' wrote this: https://forum.linuxcnc.org/media/kunena/attachments/17065/hal_pi_gpio-calculator.sh.gz == FUNCTIONS *hal_pi_gpio*.:: A single function is created. Only 1 RaspberryPi is allowed. *hal_pi_gpio.read()* Makes available the values read from all the non excluded inputs. *hal__pi_gpio.write()* Updates all the non-excluded output pins. == PINS *hal_pi_gpio*.pin.NN.in *hal_pi_gpio*.pin.NN.out == SEE ALSO *hm2_rpspi*(1) == BUGS Bug: Not specified as singleton yet allows only 1 instance Enhancements: Maybe multiple devices Maybe reset type outputs, allowing faster software stepping. Bitfields are not man readable, so a simpler method to set options. == AUTHOR Author: Michael Haberler License: GPL Version 2 Copyright (c) 2012. some code taken from the bcm2835 library by:: Author: Mike McCauley (mikem@open.com.au) Copyright (C) 2011 Mike McCauley see http://www.open.com.au/mikem/bcm2835/ Copyright (c) 2012 Ben Croston - cpuinfo.* Improvements by several other members of the LinuxCNC development team. == REPORTING BUGS Report bugs to == COPYRIGHT License: GPL Version 2 Copyright (c) 2012 Michael Haberler This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.