diff --git a/libraries/Desktop/support/digital.c b/libraries/Desktop/support/digital.c new file mode 100644 index 0000000000..691c887999 --- /dev/null +++ b/libraries/Desktop/support/digital.c @@ -0,0 +1,22 @@ +// support for digitalRead() and digitalWrite() +#include +#include +#include +#include +#include +#include "desktop.h" + + +int digitalRead(uint8_t address) +{ + switch (address) { + case 40: + // CLI slider switch + return desktop_state.slider?0:1; + + default: + break; + } + printf("digitalRead(0x%x) unsupported\n", address); + return 0; +}