Hi,
my problem is banal, but I'm new with the stellaris.I set a pin as an Input. After this I set the same pin as an output. For now there's no problem I think, but if I set the pin as an input again, the MCU doesn't read: it reads the value that I write on the pin when it was set as output.
This is the code:
#define Data_Base GPIO_PORTE_BASE
#define Data_Pin GPIO_PIN1
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
GPIODirModeSet(Data_Base, Data_Pin,GPIO_DIR_MODE_IN);
value=GPIOPinRead(Data_Base, Data_Pin);
GPIODirModeSet(Data_Base, Data_Pin,GPIO_DIR_MODE_OUT);
GPIOPinWrite(Data_Base, Data_Pin, Data_Pin);
GPIODirModeSet(Data_Base, Data_Pin,GPIO_DIR_MODE_IN);
value=GPIOPinRead(Data_Base, Data_Pin); //here I read what I have written
Where I wrong?
Thank you