GPIOIIC(4) BSD Kernel Interfaces Manual GPIOIIC(4)NAME
gpioiic -- GPIO I2C controller
SYNOPSIS
gpioiic* at gpio? offset 0 mask 0x3 flag 0x0
gpioiic* at gpio?
iic* at gpioiic?
DESCRIPTION
The gpioiic driver allows bit-banging an I2C bus as a master using two GPIO pins. By default the first pin is used as a serial data (SDA)
signal and the second as a serial clock (SCL). If the flag locator is set to 0x01, the order of the SDA and SCL signals is reversed. Both
GPIO pins must be able to drive an output and the SDA pin must be also able to read an input.
The pins can be specified in the kernel configuration with the offset and the mask locators. The offset and mask can also be specified when
gpioiic is attached at runtime using the GPIOATTACH ioctl(2) on the gpio(4) device. Each bit in the mask locator defines one pin; the pin
number is calculated as an addition of the bit position and the offset locator. For example, offset 17 and mask 0x5 defines pin numbers 17
and 19.
SEE ALSO gpio(4), iic(4), intro(4)HISTORY
The gpioiic driver first appeared in OpenBSD 3.9 and NetBSD 5.0.
AUTHORS
The gpioiic driver was written by Alexander Yurchenko <grange@openbsd.org> and was ported to NetBSD by Marc Balmer <marc@msys.ch>.
CAVEATS
A gpioiic device can not be detached from the gpio(4) bus at runtime due to the fact that iic(4) busses can not detach once attached.
BSD October 2, 2011 BSD
Check Out this Related Man Page
GPIOCTL(1) BSD General Commands Manual GPIOCTL(1)NAME
gpioctl -- GPIO control utility
SYNOPSIS
gpioctl -l [-f ctldev] [-v]
gpioctl -t [-f ctldev] pin
gpioctl -c [-f ctldev] pin flag [flag ...]
gpioctl [-f ctldev] pin [0|1]
DESCRIPTION
The gpioctl utility could be used to manage GPIO pins from userland and list available pins.
The options are as follows:
-c pin flag [flag ...]
Configure pin by setting provided flags. The following flags are currently defined:
IN Input pin
OUT Output pin
OD Open drain pin
PP Push pull pin
TS Tristate pin
PU Pull-up pin
PD Pull-down pin
II Inverted input pin
IO Inverted output pin
-f ctldev GPIO controller device to use If not specified, defaults to /dev/gpioc0
-l list available pins
-t pin toggle value of provided pin number
-v be verbose: for each listed pin print current configuration
EXAMPLES
o List pins available on GPIO controller defined by device /dev/gpioc0
gpioctl -f /dev/gpioc0 -l
o Set the value of pin 12 to 1
gpioctl -f /dev/gpioc0 12 1
o Configure pin 12 to be input pin
gpioctl -f /dev/gpioc0 -c 12 IN
SEE ALSO gpio(4), gpioiic(4), gpioled(4)HISTORY
The gpioctl utility appeared in FreeBSD 9.0.
AUTHORS
The gpioctl utility and this manual page were written by Oleksandr Tymoshenko <gonzo@freebsd.org>.
BSD November 7, 2013 BSD
Hello,
We have Windows 10 machine connected to Sparc T5440 server via serial cable.
We access the server from the Windows 10 machine using putty via serial connection. This allows us to access ILOM and Unix.
We have recently noticed that whenever we reboot the windows machine (Windows 10),... (11 Replies)
I was recently working on a project where some gpio pins were being toggled from within the user space:
const char *const amplifierGPIO = "/sys/class/gpio/gpio107/value";
void amplifierUnmute()
{
std::ofstream amp(amplifierGPIO);
if (amp.is_open())
{
... (3 Replies)