| 125 | } |
| 126 | |
| 127 | void xs_digital_read(xsMachine *the) |
| 128 | { |
| 129 | modGPIOConfiguration gpio = xsmcGetHostChunk(xsThis); |
| 130 | int value; |
| 131 | |
| 132 | value = modGPIORead(gpio); |
| 133 | if (kModGPIOReadError == value) |
| 134 | xsUnknownError("can't read pin"); |
| 135 | |
| 136 | xsmcSetInteger(xsResult, value); |
| 137 | } |
| 138 | |
| 139 | void xs_digital_write(xsMachine *the) |
| 140 | { |
nothing calls this directly
no test coverage detected