| 139 | } |
| 140 | |
| 141 | void processKeyValue( uint8_t valueType, uint8_t keyValue ) |
| 142 | { |
| 143 | switch ( valueType ) |
| 144 | { |
| 145 | // Single Key Press |
| 146 | case 0x00: |
| 147 | break; |
| 148 | // Repeated Key Press |
| 149 | case 0x01: |
| 150 | break; |
| 151 | // Modifier Key Release |
| 152 | case 0x02: |
| 153 | KeyBufferRemove[KeyBufferRemoveCount++] = keyValue; |
| 154 | return; |
| 155 | } |
| 156 | |
| 157 | // Make sure the key isn't already in the buffer |
| 158 | for ( uint8_t c = 0; c < KeyIndex_BufferUsed + 1; c++ ) |
| 159 | { |
| 160 | // Key isn't in the buffer yet |
| 161 | if ( c == KeyIndex_BufferUsed ) |
| 162 | { |
| 163 | Macro_bufferAdd( keyValue ); |
| 164 | break; |
| 165 | } |
| 166 | |
| 167 | // Key already in the buffer |
| 168 | if ( KeyIndex_Buffer[c] == keyValue ) |
| 169 | break; |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | void removeKeyValue( uint8_t keyValue ) |
| 174 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…