Improve parsing of gpio option.

This commit is contained in:
David Betz 2015-01-27 21:49:45 -05:00
parent 0f6f058d9f
commit c396afe80b
1 changed files with 10 additions and 7 deletions

View File

@ -74,6 +74,8 @@ int use_reset_method(char* method)
char *token;
token = strtok(method, ",");
if (token)
{
token = strtok(NULL, ",");
if (token)
{
@ -84,6 +86,7 @@ int use_reset_method(char* method)
{
propellerResetGpioLevel = atoi(token);
}
}
printf ("Using GPIO pin %d as Propeller reset ", propellerResetGpioPin);
if (propellerResetGpioLevel)