aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--icetime/icetime.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc
index 049c635..fef65d2 100644
--- a/icetime/icetime.cc
+++ b/icetime/icetime.cc
@@ -222,10 +222,20 @@ void read_pcf(const char *filename)
if (tok == nullptr || strcmp(tok, "set_io"))
continue;
+ bool skip_next = false;
std::vector<std::string> args;
while ((tok = strtok(nullptr, " \t\r\n")) != nullptr) {
+ if(skip_next) {
+ skip_next = false;
+ continue;
+ }
if (!strcmp(tok, "--warn-no-port"))
continue;
+ if (!strcmp(tok, "-pullup") || !strcmp(tok, "-pullup_resistor")) {
+ skip_next = true; // skip argument
+ continue;
+ }
+
args.push_back(tok);
}