Browse Source

Fix compiler warning with Keyboard.set_modifier

main
PaulStoffregen 8 years ago
parent
commit
4b7151d0e0
7 changed files with 10 additions and 10 deletions
  1. +1
    -1
      teensy3/usb_keyboard.h
  2. +2
    -2
      usb_disk/usb_api.cpp
  3. +1
    -1
      usb_disk/usb_api.h
  4. +2
    -2
      usb_hid/usb_api.cpp
  5. +1
    -1
      usb_hid/usb_api.h
  6. +2
    -2
      usb_serial_hid/usb_api.cpp
  7. +1
    -1
      usb_serial_hid/usb_api.h

+ 1
- 1
teensy3/usb_keyboard.h View File

size_t write(int n) { return write((uint8_t)n); } size_t write(int n) { return write((uint8_t)n); }
using Print::write; using Print::write;
void write_unicode(uint16_t n) { usb_keyboard_write_unicode(n); } void write_unicode(uint16_t n) { usb_keyboard_write_unicode(n); }
void set_modifier(uint8_t c) { keyboard_modifier_keys = c; }
void set_modifier(uint16_t c) { keyboard_modifier_keys = (uint8_t)c; }
void set_key1(uint8_t c) { keyboard_keys[0] = c; } void set_key1(uint8_t c) { keyboard_keys[0] = c; }
void set_key2(uint8_t c) { keyboard_keys[1] = c; } void set_key2(uint8_t c) { keyboard_keys[1] = c; }
void set_key3(uint8_t c) { keyboard_keys[2] = c; } void set_key3(uint8_t c) { keyboard_keys[2] = c; }

+ 2
- 2
usb_disk/usb_api.cpp View File







void usb_keyboard_class::set_modifier(uint8_t c)
void usb_keyboard_class::set_modifier(uint16_t c)
{ {
keyboard_report_data[0] = c;
keyboard_report_data[0] = (uint8_t)c;
} }
void usb_keyboard_class::set_key1(uint8_t c) void usb_keyboard_class::set_key1(uint8_t c)
{ {

+ 1
- 1
usb_disk/usb_api.h View File

#endif #endif
using Print::write; using Print::write;
void write_unicode(uint16_t unicode) { write_keycode(unicode_to_keycode(unicode)); } void write_unicode(uint16_t unicode) { write_keycode(unicode_to_keycode(unicode)); }
void set_modifier(uint8_t);
void set_modifier(uint16_t);
void set_key1(uint8_t); void set_key1(uint8_t);
void set_key2(uint8_t); void set_key2(uint8_t);
void set_key3(uint8_t); void set_key3(uint8_t);

+ 2
- 2
usb_hid/usb_api.cpp View File







void usb_keyboard_class::set_modifier(uint8_t c)
void usb_keyboard_class::set_modifier(uint16_t c)
{ {
keyboard_report_data[0] = c;
keyboard_report_data[0] = (uint8_t)c;
} }
void usb_keyboard_class::set_key1(uint8_t c) void usb_keyboard_class::set_key1(uint8_t c)
{ {

+ 1
- 1
usb_hid/usb_api.h View File

virtual size_t write(uint8_t); virtual size_t write(uint8_t);
using Print::write; using Print::write;
void write_unicode(uint16_t unicode) { write_keycode(unicode_to_keycode(unicode)); } void write_unicode(uint16_t unicode) { write_keycode(unicode_to_keycode(unicode)); }
void set_modifier(uint8_t);
void set_modifier(uint16_t);
void set_key1(uint8_t); void set_key1(uint8_t);
void set_key2(uint8_t); void set_key2(uint8_t);
void set_key3(uint8_t); void set_key3(uint8_t);

+ 2
- 2
usb_serial_hid/usb_api.cpp View File







void usb_keyboard_class::set_modifier(uint8_t c)
void usb_keyboard_class::set_modifier(uint16_t c)
{ {
keyboard_report_data[0] = c;
keyboard_report_data[0] = (uint8_t)c;
} }
void usb_keyboard_class::set_key1(uint8_t c) void usb_keyboard_class::set_key1(uint8_t c)
{ {

+ 1
- 1
usb_serial_hid/usb_api.h View File

#endif #endif
using Print::write; using Print::write;
void write_unicode(uint16_t unicode) { write_keycode(unicode_to_keycode(unicode)); } void write_unicode(uint16_t unicode) { write_keycode(unicode_to_keycode(unicode)); }
void set_modifier(uint8_t);
void set_modifier(uint16_t);
void set_key1(uint8_t); void set_key1(uint8_t);
void set_key2(uint8_t); void set_key2(uint8_t);
void set_key3(uint8_t); void set_key3(uint8_t);

Loading…
Cancel
Save