HID DEVICE MESSAGES
NOTE: 
	The values are in hexadecimal (Exp. 0x11)
	All type of messages have in the first byte the message type. After the message type is the message content. The meaning entry of the description always deals with the message content (first byte and byte 0 means, first byte from the content).

ERROR MESSAGES (*) (received only as response for OUTPUT messages):
RESULT_PARAMETER_MISSING	0x01 // Request does not contain all necessary parameters (request is too short, no length or no address either).
RESULT_DATA_MISSING		0x02 // Request attempts to write more data than was actually sent.
RESULT_BLOCK_READ_ONLY	0x03 // Request attempts to erase or write a block within the flasher code section.
RESULT_BLOCK_NOT_ERASABLE	0x04 // Request attempts to erase a block outside of "erasable" memory space.
RESULT_BLOCK_TOO_BIG 		0x05 // Request attempts to access more data at once than the HID buffer can handle.
RESULT_SECTION_OVERFLOW	0x06 // Request (address & length) attempts to cross over a section boundary (section boundaries are set at 1Mbyte boundaries -> 0x100000, 0x200000... etc.).

MESSAGE DESCRIPTION
KEYBOARD MODE: INPUT

IN_REPORT_POWER_STATE			0x01
	-POWER key was pressed
	-length: 1 byte (INPUT)
	-meaning:	a) at keypress the value is alwyas 1
			b) on Windows OS this message is used by the OS (not included in the HIDDaemon)

IN_REPORT_KEY_STATE			0x11
	-key pressed
	-length: 2 byte (INPUT)
	-range: 0x00...0x0E
	-meaning:	a) maximum two keypresses in the same time are accepted
			b) nothing is pressed: 0x00, 0x00
			c) one or two keys was pressed: the two values are represnting the two keys
			d) three or more keys pressed: 0x00, 0x00

IN_REPORT_IR_DATA				0x21
	-infrared message 
	-length: 1+maximum 20 byte (INPUT)
	-meaning:	a) first byte representing the length of the IR message (0x00...0x14)
			b) IR message is fllowing the length: two bytes are represnting one int 

KEYBOARD MODE: OUTPUT

OUT_REPORT_LED_STATE			0x81
	-setting the status of the LED's
	-length: 1 byte (OUTPUT)
	-range: 0x00...0xFF
	-meaning:	a) bit set to "1" switches the LED to ON
			b) bit set to "0" switches the LED to OFF
			(every bit is representing one LED)

OUT_REPORT_LCD_BACKLIGHT		0x91
	-LCD bakclight on/off
	-length: 1 byte (OUTPUT)
	-range: 0x00...0xFF
	-meaning:	a) 0x00 - Backlight OFF
			b) 0x01...0xFF - Backlight ON

OUT_REPORT_LCD_CONTRAST		0x92
	-LCD contrast
	-length: 1 byte (OUTPUT)
	-range: 0x00...0x40
	-meaning:	a) 0x00 means MAXIMUM contrast/0x40 means MINIMUM contrast

OUT_REPORT_LCD_CONTROL			0x93
	-LCD working mode 
	-length: 1 byte (OUTPUT)
	-range: 0x00...0x07
	-meaning:	a) bit 0: cursor blinking (BLINK) ON("1")/OFF("0")
			b) bit 1: cursor switch ON("1")/OFF("0")
			c) bit 2: LCD switch ON("1")/OFF("0")

OUT_REPORT_LCD_CLEAR			0x94
	-LCD screen clear
	-length: 0 byte (OUTPUT)

OUT_REPORT_LCD_TEXT			0x98
	-LCD write text
	-length: 3+20 byte (OUTPUT)
	-meaning:	a) first byte: ROW (0x00...0x01)
			b) second byte: COLUMN (0x00...0x14)
			c) third byte: STRING LENGTH (0x00...0x14)
			d) STRING  - maximum 20 chars, reduced ASCII (see the LCD ASCII table)

OUT_REPORT_LCD_FONT			0x9C
	-LCD font change (for the first 8 characters only which can be rewritten dinamically)
	-length: 1+8 byte (OUTPUT)
	-meaning:	a) first byte: CHAR NUMBER (0x00...0x07)
			b) BITMAP of the new char (8*5 dots in 8 bytes, every byte holding row in the lower bits)

OUT_REPORT_EXIT_KEYBOARD		0xEF
	-exit keyboard mode (switch to flasher mode)
	-length: 2
	-meaning:	a) timeout in milliseconds between switching off the device and starting it in flasher mode (timeout=0-65535)
			b) byte 0: timeout & 0xff
			c) byte 1: (timeout >> 8) & 0xff

OUT_SET_SNOOZE_TIME			0xF8
	-set's the timer value (this time is between switching off the device and witching it on in the new mode after the OUT_REPORT_EXIT_KEYBOARD message)
	-length:2
	NOTE: this is not used anymore - use the snoozetime from OUT_REPORT_EXIT_KEYBOARD and OUT_REPORT_EXIT_FLASHER instead!

IN_REPORT_EXT_EE_DATA			0x31
	-as response for  OUT_REPORT_EXT_EE_READ and OUT_REPORT_EXT_EE_WRITE (check those messages for response description)

OUT_REPORT_EXT_EE_READ			0xA1
	-read external eprom
	-length: 3 (OUTPUT)
	-meaning:	a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 3: LENGTH of the data what has to be readed(1-20)
	-response: 
		- one of the ERROR_MESSAGES (*) if error occured
		- if everything is ok: response type = IN_REPORT_EXT_EE_DATA
			a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: LENGTH of the data what will be written(1-20)
			d) DATA (LENGTH bytes)

OUT_REPORT_EXT_EE_WRITE			0xA2
	-write external eprom
	-length: 3+LENGTH (OUTPUT)
	-meaning:	a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: LENGTH of the data what will be written(1-20)
			d) DATA (LENGTH bytes)
	-response: 
		- one of the ERROR_MESSAGES (*) if error occured
		- if everything is ok: response type = IN_REPORT_EXT_EE_DATA
			- same format as the request: a), b), c), d)
		NOTE: if the received data does not match the sent one - a memory write error occured!

IN_REPORT_INT_EE_DATA			0x32
	-as response for  OUT_REPORT_INT_EE_READ and OUT_REPORT_INT_EE_WRITE (check those message for response description)

OUT_REPORT_INT_EE_READ			0xA3
	-read internal eprom
	-length: 3 (OUTPUT)
	-meaning:	a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 3: LENGTH of the data what has to be readed(1-20)
	-response: 
		- one of the ERROR_MESSAGES (*) if error occured
		- if everything is ok: response type = IN_REPORT_INT_EE_DATA
			a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: LENGTH of the data what will be written(1-20)
			d) DATA (LENGTH bytes)

OUT_REPORT_INT_EE_WRITE			0xA4
	-write intrenal eprom
	-length: 3+LENGTH (OUTPUT)
	-meaning:	a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: LENGTH of the data what will be written(1-20)
			d) DATA (LENGTH bytes)
	-response: 
		- one of the ERROR_MESSAGES (*) if error occured
		- if everything is ok: response type = IN_REPORT_INT_EE_DATA
			- same format as the request: a), b), c), d)
		NOTE: if the received data does not match the sent one - a memory write error occured!

USB FLASH MODE

OUT_REPORT_EXIT_FLASHER			0xFF
	-exit flasher mode (switch to keyboard mode)
	-length: 2 (OUTPUT)
	-meaning:	a) timeout in milliseconds between switching off the device and starting it in keyboard mode (timeout=0-65535)
			b) byte 0: timeout & 0xff
			c) byte 1: (timeout >> 8) & 0xff

OUT_SET_SNOOZE_TIME			0xF8
	-already described for keyboard mode (not used anymore)

OUT_REPORT_GET_VERSION			0xF1				
	-get the software version of HID (used also to reset the messagequeue of the HID after mode switch)
	-length: 0 (OUTPUT)
	-response: ?
	
OUT_REPORT_ERASE_MEMORY		0xF2	
	-erase the memory (anywhere inside the 64 byte-block)
	-length: 3 (OUTPUT)
	-meaning:	a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: (addr >> 16) & 0xff - ADDRESSUP
	-response: 
		- one of the ERROR_MESSAGES (*) if error occured
		- if everything is ok: response type = OUT_REPORT_ERASE_MEMORY
			- same format as the request: a), b), c).

OUT_REPORT_READ_MEMORY		0xF3
	-read memory
	-length: 4 (OUTPUT)
	-meaning:	a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: (addr >> 16) & 0xff - ADDRESSUP
			d) byte 3: LENGTH of the data what has to be readed(1-32)
	-response: 
		- one of the ERROR_MESSAGES (*) if error occured
		- if everything is ok: response type = OUT_REPORT_READ_MEMORY
			a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: (addr >> 16) & 0xff - ADDRESSUP
			d) byte 3: LENGTH of the data what will be written(1-32)
			e) DATA (LENGTH bytes)

OUT_REPORT_WRITE_MEMORY		0xF4
	-write memory
	-length: 4+LENGTH (OUTPUT)
	-meaning:	a) byte 0: addr & 0xff - ADDRESSLO
			b) byte 1: (addr >> 8) & 0xff - ADDRESSHI
			c) byte 2: (addr >> 16) & 0xff - ADDRESSUP
			d) byte 3: LENGTH of the data what will be written(1-32)
			e) DATA (LENGTH bytes)
	-response:
		- one of the ERROR_MESSAGES (*) if error occured
		- if everything is ok: response type = OUT_REPORT_WRITE_MEMORY
			- same format as the request: a), b), c), d), e).
		NOTE: if the received data does not match the sent one - a memory write error occured!