DSerial Edge GPIO pins 2.2-2.7
Posted: Wed Oct 21, 2009 4:50 pm
On DSerial Edge, is there a reason that when I set P2.2-P2.7 to OUTPUT, I can't use them as GPIO's?
Setting them high/low doesn't do anything (I have a LED attached to test them which works on 0.4-0.7 and 1.0-1.7).
In thinking maybe the enabled Uart might have something to do with it (restricting general i/o access to those pins), I tried disabling it by applying several dseSetModes() combinations (at first I thought uncommenting it would be sufficient to not use UART/Servo and just use them as GPIO pins) and I also tried to disable Uart completely by setting UartEnabled[0] (in dserial.c) to false, all no to avail.. maybe (and this is most likely) I'm just not understanding something?
Am I missing something?
Example code:
Setting them high/low doesn't do anything (I have a LED attached to test them which works on 0.4-0.7 and 1.0-1.7).
In thinking maybe the enabled Uart might have something to do with it (restricting general i/o access to those pins), I tried disabling it by applying several dseSetModes() combinations (at first I thought uncommenting it would be sufficient to not use UART/Servo and just use them as GPIO pins) and I also tried to disable Uart completely by setting UartEnabled[0] (in dserial.c) to false, all no to avail.. maybe (and this is most likely) I'm just not understanding something?
Am I missing something?
Example code:
Code: Select all
// dseSetModes(ENABLE_RS232 /* | ENABLE_SERVO */);
dsePinMode(2, 2, OUTPUT);
dsePinMode(2, 3, OUTPUT);
while(1) {
{...}
if(keysDown() & KEY_A) {
dsePinWrite(2, 2, false);
dsePinWrite(2, 3, false);
} else if(keysDown() & KEY_B) {
dsePinWrite(2, 2, true);
dsePinWrite(2, 3, true);
}
}