I left the original code in since the error was due to an incorrect pinmux setting, so no merge of this one :-)