MCPcopy Create free account
hub / github.com/kiibohd/controller / processKeyValue

Function processKeyValue

Scan/Deprecated/MicroSwitch8304/scan_loop.c:104–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void processKeyValue( uint8_t keyValue )
105{
106 // Finalize output buffer
107 // Mask 8th bit
108 keyValue &= 0x7F;
109
110 // Interpret scan code
111 switch ( keyValue )
112 {
113 case 0x40: // Clear buffer command
114 info_printNL("CLEAR!");
115
116 BufferReadyToClear = 1;
117 break;
118 case 0x7F:
119 scan_lockKeyboard();
120 _delay_ms(3000);
121 scan_unlockKeyboard();
122
123 default:
124 // Make sure the key isn't already in the buffer
125 for ( uint8_t c = 0; c < KeyIndex_BufferUsed + 1; c++ )
126 {
127 // Key isn't in the buffer yet
128 if ( c == KeyIndex_BufferUsed )
129 {
130 Macro_bufferAdd( keyValue );
131 break;
132 }
133
134 // Key already in the buffer
135 if ( KeyIndex_Buffer[c] == keyValue )
136 break;
137 }
138 break;
139 }
140}
141
142// USART Receive Buffer Full Interrupt
143ISR(USART1_RX_vect)

Callers 1

scan_loop.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…