clock in a data bit
| 221 | |
| 222 | // clock in a data bit |
| 223 | uint32_t SNESpad::clock() |
| 224 | { |
| 225 | uint32_t ret = 0; |
| 226 | |
| 227 | #ifdef ARDUINO |
| 228 | digitalWrite(clockPin,LOW); |
| 229 | delayMicroseconds(6); |
| 230 | |
| 231 | ret = digitalRead(dataPin); |
| 232 | digitalWrite(clockPin,HIGH); |
| 233 | |
| 234 | delayMicroseconds(6); |
| 235 | #else |
| 236 | gpio_put(clockPin,0); |
| 237 | busy_wait_us(6); |
| 238 | |
| 239 | ret = gpio_get(dataPin); |
| 240 | gpio_put(clockPin,1); |
| 241 | |
| 242 | busy_wait_us(6); |
| 243 | #endif |
| 244 | return ret; |
| 245 | } |
| 246 | |
| 247 | // latch to start read |
| 248 | void SNESpad::latch() |
nothing calls this directly
no outgoing calls
no test coverage detected