MCPcopy Create free account
hub / github.com/InkboxSoftware/all-screen-keyboard / selectChipNumber

Method selectChipNumber

keyboard/src/readHallEffect.cpp:60–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void 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
74void hallEffectReader::deselectChipNumber(int chipNumber){
75 //break into three bits

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected