Jose Rubio Vico

parallel bus using GPIO

Discussion created by Jose Rubio Vico on Jun 24, 2011
Latest reply on Jun 24, 2011 by Tom Moulton

Hello, I´m using this code to initialize a parallel bus using GPIO but it doesn't run well, can somebody help me?, thanks:

const GPIO_PIN_STRUCT pin_table[] = {

                        GPIO_PORT_B | GPIO_PIN0,

                        GPIO_PORT_B | GPIO_PIN1,

                        GPIO_PORT_B | GPIO_PIN2,

                        GPIO_PORT_B | GPIO_PIN3,

                GPIO_LIST_END

                };  

MQX_FILE_PTR port;

_io_init();

a = _io_gpio_install("gpio:");

port = fopen("gpio:write", (char_ptr) &pin_table);

_io_write(port,&puerto, a);

Outcomes