UART pins as GPIO
Posted: Thu Mar 05, 2015 10:18 am
I need 3 GPIO pins to drive a shift register, however I cant seem to get GPIO1/3 (UART) to act as ordinary output pins.
Would this the code i'm using:
this anywhere near the mark?
Would this the code i'm using:
Code: Select all
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U,FUNC_GPIO1);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U,FUNC_GPIO3);
while ( true){
GPIO_OUTPUT_SET(2, 1);
GPIO_OUTPUT_SET(1, 1);
GPIO_OUTPUT_SET(3, 1);
GPIO_OUTPUT_SET(0, 1);
os_delay_us(1000000);
GPIO_OUTPUT_SET(2, 0);
GPIO_OUTPUT_SET(1, 0);
GPIO_OUTPUT_SET(3, 0);
GPIO_OUTPUT_SET(0, 0);
os_delay_us(1000000);
}
this anywhere near the mark?