Hi,
Is it possible to change IO port directions during program execution? Say I want to change input to output when I change mode of a serial port from master to slave.
Thanks in advance,
gx
Can user change port direction during runtime
-
- Junior Member
- Posts: 7
- Joined: Sat Jul 14, 2012 5:14 pm
-
- XCore Expert
- Posts: 589
- Joined: Wed Feb 29, 2012 10:03 am
You can declare the port without specifying the port direction and use as both input and output in your design. You can use peek() function to peek the value on the port.