I made one minor change: The pullup switch should warn, but not prohibit, activation when pins are active.
I'm sorry, I read the code incorrectly.
//don't allow pullups on some modules. also: V0a limitation of 2 resistors
if(modeConfig.allowpullup==0)
{ bpWmessage(MSG_ERROR_MODE);
}
else
{
if(modeConfig.HiZ==0){bpWmessage(MSG_ERROR_NOTHIZPIN);}
BP_PULLUP_ON(); //pseudofunction in hardwarevx.h
bpWmessage(MSG_OPT_PULLUP_ON);
}I added the if(modeConfig.HiZ==0){bpWmessage(MSG_ERROR_NOTHIZPIN);} so it warns that the pins are in active mode not hi-z mode.
I think allowpullup is a worthless variable. All modes (as far as I can tell, except HiZ) allow pullups, so why not just test if mode!=HiZ? I think this is garbage left over from when not all modes supported HiZ pin types (UART was the last to be converted).
I really like the history, fantastic. I'd like to add VT100 arrow support eventually, so you can scroll through with the up/down keys.
A few other items (you said it's not finished, so I'm not worried at all):
Is the extra space after the prompt intentional?
Is it possible to restore the default option that was shown in ()> at the prompts?
Can we have a record of the actions taken when multiple commands are processed (for debugging)? m 2 m 3 m 4 shows the init for the UART, but then jumps into the I2C mode.