From e6705c88b456f949e488000aa56bd0840b9356b4 Mon Sep 17 00:00:00 2001 From: Antoine van Gelder Date: Mon, 7 Oct 2024 14:35:22 +0200 Subject: [PATCH] Add support for PULLMODE=NONE --- app/scripts/services/compiler.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/scripts/services/compiler.js b/app/scripts/services/compiler.js index 1d66e196a..c770cdb72 100644 --- a/app/scripts/services/compiler.js +++ b/app/scripts/services/compiler.js @@ -956,9 +956,7 @@ angular.module('icestudio') //-- Get the pullmode property of the physical pin (its id is pin.value) let pullmode = common.selectedBoard.pinout.find(x => x.value === value).pullmode; - pullmode = (typeof pullmode === 'undefined') ? 'NONE' : pullmode; - - if (pullmode === 'UP' || pullmode === 'DOWN') { + if (pullmode === 'UP' || pullmode === 'DOWN' || pullmode === 'NONE') { code += 'PULLMODE=' + pullmode; } code += ' ;\n\n'; @@ -978,9 +976,7 @@ angular.module('icestudio') //-- Get the pullmode property of the physical pin (its id is pin.value) let pullmode = common.selectedBoard.pinout.find(x => x.value === value).pullmode; - pullmode = (typeof pullmode === 'undefined') ? 'NONE' : pullmode; - - if (pullmode === 'UP' || pullmode === 'DOWN') { + if (pullmode === 'UP' || pullmode === 'DOWN' || pullmode === 'NONE') { code += 'PULLMODE=' + pullmode; } code += ' ;\n\n';