EH-MA41 User Guide
24-26
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,02,00,00<CR><LF>
send a consumer key report to the HID host. The pressed key is released.
OK<CR><LF>
response from the module to indicate the command is adopted.
3. Mouse Report:
A1 03 Buttons XmXl YlXh YhYm Wheel
The
Buttons
is a bit mask interpreted as shown:
Bit Mask of Buttons Byte in Mouse Report
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Button Button Button Button Button Button Button Button
8 7 6 5 4 3 2 1
The
XhXmXl
compose the movement on X axis. The range is from -2048(800h) to +2047(7FFh).
The
YhYmYl
compose the movement on Y axis. The range is from -2048(800h) to +2047(7FFh).
The
Wheel
is the movement of wheel. The range is from -127(81h) to +127(7Fh).
Ex. 5.96. To press the left button of the mouse, the mouse report should be:
A1 03 01 00 00 00 00
Ex. 5.97. To move the mouse towards top-right( X:3 pixel, Y:-4 pixel), the mouse report should be:
A1 03 00 03 C0 FF 00
XhXmXl = 003h = 3
(Decimal)
YhYmYl = FFCh = -4
(Decimal)
Ex. 5.98. To scroll up for 1 line, the mouse report should be:
A1 03 00 00 00 00 FF
Wheel = FFh = -1 (Decimal)
Ex. 5.99. To send a mouse report to HID host:
AT+KR=A1,03,01,00,00,00,00<CR><LF>
send a mouse report to the HID host. The Button1(Left Button) is
pressed.
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,03,00,00,00,00,00<CR><LF>
send a mouse report to the HID host. The pressed key is released.
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,03,00,03,C0,FF,00<CR><LF>
send a mouse report to the HID host. The mouse is move to upper-
right.
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,03,00,00,00,00,00<CR><LF>
send a mouse report to the HID host. The mouse is stopped.
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,03,00,00,00,00,FF<CR><LF>
send a mouse report to the HID host. The mouse wheel scroll up for
one line.
OK<CR><LF>
response from the module to indicate the command is adopted.
AT+KR=A1,03,00,00,00,00,00<CR><LF>
send a mouse report to the HID host. The mouse is stopped.
OK<CR><LF>
response from the module to indicate the command is adopted.
4. Joystick/Gamepad:
A1 04 Throttle X Y Z Rz HatSwitch Buttons1 Buttons2
The
Throttle
is the throttle value. The range is from -127(81h) to +127(7Fh).
The
X
is the position of X axis of left stick. The range is from -127(81h) to +127(7Fh).
The
Y
is the position of Y axis of left stick. The range is from -127(81h) to +127(7Fh).
The
Z
is the position of Z axis (generally, it is used as X axis of right stick). The range is from -127(81h) to +127(7Fh).
The
Rz
is the rotation of Z axis (generally, it is used as Y axis of right stick). The range is from -127(81h) to +127(7Fh).
The
HatSwitch
is the direction of hat switch. The range is from 00h to 07h, represents Top(00h), Top-right(01h),
Right(02h), Bottom-right(03h), Bottom(04h), Bottom-left(05h), Left(06h), Top-Left(07h). The value out of range is invalid,
and the hat switch will not move.
The
Buttons1
is a bit mask of first 8 buttons(Button1
—Button8). Each bit represents one button.
The
Buttons2
is a bit mask of second 8 buttons(Button9
—Button16). Each bit represents one button.