removed weak asciimap wrapper
This commit is contained in:
parent
744160b847
commit
2f86c68f4d
2 changed files with 2 additions and 7 deletions
|
|
@ -85,10 +85,6 @@ void Keyboard_::sendReport(KeyReport* keys)
|
|||
HID.SendReport(HID_REPORTID_KEYBOARD,keys,sizeof(KeyReport));
|
||||
}
|
||||
|
||||
uint8_t Keyboard_::getKeycode(uint8_t k){
|
||||
return pgm_read_byte(_asciimap + k);
|
||||
}
|
||||
|
||||
// press() adds the specified key (printing, non-printing, or modifier)
|
||||
// to the persistent key report and sends the report. Because of the way
|
||||
// USB HID works, the host acts like the key remains pressed until we
|
||||
|
|
@ -102,7 +98,7 @@ size_t Keyboard_::press(uint8_t k)
|
|||
_keyReport.modifiers |= (1<<(k-128));
|
||||
k = 0;
|
||||
} else { // it's a printing key
|
||||
k = getKeycode(k);
|
||||
k = pgm_read_byte(_asciimap + k);
|
||||
if (!k) {
|
||||
setWriteError();
|
||||
return 0;
|
||||
|
|
@ -146,7 +142,7 @@ size_t Keyboard_::release(uint8_t k)
|
|||
_keyReport.modifiers &= ~(1<<(k-128));
|
||||
k = 0;
|
||||
} else { // it's a printing key
|
||||
k = getKeycode(k);
|
||||
k = pgm_read_byte(_asciimap + k);
|
||||
if (!k) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ class Keyboard_ : public Print
|
|||
private:
|
||||
KeyReport _keyReport;
|
||||
void sendReport(KeyReport* keys);
|
||||
uint8_t getKeycode(uint8_t k) __attribute__((weak));
|
||||
public:
|
||||
Keyboard_(void);
|
||||
void begin(void);
|
||||
|
|
|
|||
Loading…
Reference in a new issue