> btwrite(0x7fff,BT848_GPIO_OUT_EN); // disable all outputs
> btwrite(0x0000,BT848_GPIO_OUT_EN); // enable all outputs
> btwrite(0x0000,BT848_GPIO_DATA); // set all outputs to /0 (+5V)
> btwrite(0x7fff,BT848_GPIO_DATA); // set all outputs to /1 (0V)

Each GPIO pin is basically a tri-state buffer.  To use a GPIO as an
output you must first enable the bit in the GPIO_OUT_EN register (1 =
enable the pin for output).  Once the output is enabled, writing data to
the GPIO_DATA register should show on the GPIO pin.  A '1' should drive
a +5V logic high and a '0' should drive a 0V logic low.

Each GPIO pin has an internal pull-up so all undriven GPIO pins will
have a +5V logic high.

So here is what your code should look like:

btwrite(0x0000,BT848_GPIO_OUT_EN); // DISABLE all outputs
btwrite(0x7fff,BT848_GPIO_OUT_EN); // ENABLE all outputs
btwrite(0x0000,BT848_GPIO_DATA); // set all outputs to logic 0 (0V)
btwrite(0x7fff,BT848_GPIO_DATA); // set all outputs to logic 1 (+5V)

Mike




_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list

Reply via email to