hid pinout

This commit is contained in:
Devaev Maxim
2018-10-05 20:30:49 +03:00
parent a87963e300
commit 125a56e554
9 changed files with 52 additions and 5 deletions

View File

@@ -141,6 +141,8 @@ class Server: # pylint: disable=too-many-instance-attributes
app.router.add_get("/ws", self.__ws_handler)
app.router.add_post("/hid/reset", self.__hid_reset_handler)
app.router.add_get("/atx", self.__atx_state_handler)
app.router.add_post("/atx/click", self.__atx_click_handler)
@@ -228,6 +230,12 @@ class Server: # pylint: disable=too-many-instance-attributes
return
await self.__hid.send_mouse_wheel_event(delta_y)
# ===== HID
async def __hid_reset_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response:
await self.__hid.reset()
return _json()
# ===== ATX
async def __atx_state_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response: