File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ def_prim(http_post, tenToOneU32) {
387
387
return true ;
388
388
}
389
389
390
- #define NUM_DIGITAL_PINS 19
390
+ #define NUM_DIGITAL_PINS 25
391
391
uint32_t PINS[NUM_DIGITAL_PINS] = {};
392
392
uint8_t MODES[NUM_DIGITAL_PINS] = {};
393
393
@@ -406,11 +406,12 @@ def_prim(chip_digital_write, twoToNoneU32) {
406
406
uint8_t pin = arg1.uint32 ;
407
407
uint8_t val = arg0.uint32 ;
408
408
debug (" EMU: chip_digital_write(%u,%u) \n " , pin, val);
409
- if (pin < NUM_DIGITAL_PINS && MODES[pin] == 0x01 ) {
409
+ bool writable = pin < NUM_DIGITAL_PINS && MODES[pin] == 0x02 ;
410
+ if (writable) {
410
411
PINS[pin] = val;
411
412
}
412
413
pop_args (2 );
413
- return pin < NUM_DIGITAL_PINS ;
414
+ return writable ;
414
415
}
415
416
416
417
def_prim_reverse (chip_digital_write) {
You can’t perform that action at this time.
0 commit comments