PaulStoffregen / PS2Keyboard

PS/2 Keyboard Library for Arduino
http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html
147 stars 57 forks source link

Doesn't compile with µC from Mighty Core (i.e. ATmega644) and MiniCore (i.e. ATmega328) #41

Open Greece2 opened 2 months ago

Greece2 commented 2 months ago

When trying to compile the examples (i.e. "international.ino" to get started) using µCs from Mighty Core (i.e. ATmega644) and MiniCore(i.e. ATmega328), I get the following error:

W:\libraries\PS2Keyboard\PS2Keyboard.cpp:271:1: error: narrowing conversion of '-15708' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing] };

and the warnings:

W:\libraries\PS2Keyboard\PS2Keyboard.cpp:265:53: warning: multi-character character constant [-Wmultichar] 0 /CapsLock/, 0 /Rshift/, PS2_ENTER /Enter/, '¤', 0, '#', 0, 0, ^~~~ W:\libraries\PS2Keyboard\PS2Keyboard.cpp:153:1: warning: missing initializer for member 'PS2Keymap_t::altgr' [-Wmissing-field-initializers] };

Using the ProMini (also an ATmega328), Nano etc., everything compiles absolutely fine, no warnings, no errors.

As I do need the 644 and other µC from the Mighty- and MiniCore Libs, any idea how to overcome this problem ?

Thanks in advance !