| 58 | } |
| 59 | |
| 60 | void hallEffectReader::selectChipNumber(int chipNumber){ |
| 61 | //break into three bits |
| 62 | int A0 = chipNumber & 0x01; |
| 63 | int A1 = chipNumber & 0x02; |
| 64 | int A2 = chipNumber & 0x04; |
| 65 | int A3 = chipNumber & 0x08; |
| 66 | |
| 67 | digitalWrite(chipSelPin0, A0); |
| 68 | digitalWrite(chipSelPin1, A1); |
| 69 | digitalWrite(chipSelPin2, A2); |
| 70 | digitalWrite(chipSelPin3, A3); |
| 71 | //usleep(10000); //sleep for 1ms to settle internal multiplexer |
| 72 | } |
| 73 | |
| 74 | void hallEffectReader::deselectChipNumber(int chipNumber){ |
| 75 | //break into three bits |
nothing calls this directly
no outgoing calls
no test coverage detected