| 176 | } |
| 177 | |
| 178 | uint8_t modGPIORead(modGPIOConfiguration config) |
| 179 | { |
| 180 | if (config->pin < 16) |
| 181 | return (GPIO_REG_READ(GPIO_IN_ADDRESS) >> config->pin) & 1; |
| 182 | |
| 183 | if (16 == config->pin) |
| 184 | return READ_PERI_REG(RTC_GPIO_IN_DATA) & 1; |
| 185 | |
| 186 | if (17 == config->pin) |
| 187 | return system_adc_read() >= 512; |
| 188 | |
| 189 | return kModGPIOReadError; |
| 190 | } |
| 191 | |
| 192 | void modGPIOWrite(modGPIOConfiguration config, uint8_t value) |
| 193 | { |
no outgoing calls
no test coverage detected