| 162 | } |
| 163 | |
| 164 | void xs_digital_static_write(xsMachine *the) |
| 165 | { |
| 166 | int pin = xsmcToInteger(xsArg(0)); |
| 167 | int value = xsmcToInteger(xsArg(1)); |
| 168 | modGPIOConfigurationRecord config; |
| 169 | |
| 170 | if (modGPIOInit(&config, NULL, pin, kModGPIOOutput)) |
| 171 | xsUnknownError("can't init pin"); |
| 172 | |
| 173 | modGPIOWrite(&config, value ? 1 : 0); |
| 174 | modGPIOUninit(&config); |
| 175 | } |
| 176 | |
| 177 | void wakeableDigitalDeliver(void *the, void *refcon, uint8_t *message, uint16_t messageLength) |
| 178 | { |
nothing calls this directly
no test coverage detected