1d97d5c0cSVladimir Kondratyev /*- 2d97d5c0cSVladimir Kondratyev * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3d97d5c0cSVladimir Kondratyev * 4d97d5c0cSVladimir Kondratyev * Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org> 5d97d5c0cSVladimir Kondratyev * Copyright (c) 2020 Greg V <greg@unrelenting.technology> 6d97d5c0cSVladimir Kondratyev * 7d97d5c0cSVladimir Kondratyev * Redistribution and use in source and binary forms, with or without 8d97d5c0cSVladimir Kondratyev * modification, are permitted provided that the following conditions 9d97d5c0cSVladimir Kondratyev * are met: 10d97d5c0cSVladimir Kondratyev * 1. Redistributions of source code must retain the above copyright 11d97d5c0cSVladimir Kondratyev * notice, this list of conditions and the following disclaimer. 12d97d5c0cSVladimir Kondratyev * 2. Redistributions in binary form must reproduce the above copyright 13d97d5c0cSVladimir Kondratyev * notice, this list of conditions and the following disclaimer in the 14d97d5c0cSVladimir Kondratyev * documentation and/or other materials provided with the distribution. 15d97d5c0cSVladimir Kondratyev * 16d97d5c0cSVladimir Kondratyev * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17d97d5c0cSVladimir Kondratyev * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18d97d5c0cSVladimir Kondratyev * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19d97d5c0cSVladimir Kondratyev * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20d97d5c0cSVladimir Kondratyev * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21d97d5c0cSVladimir Kondratyev * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22d97d5c0cSVladimir Kondratyev * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23d97d5c0cSVladimir Kondratyev * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24d97d5c0cSVladimir Kondratyev * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25d97d5c0cSVladimir Kondratyev * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26d97d5c0cSVladimir Kondratyev * SUCH DAMAGE. 27d97d5c0cSVladimir Kondratyev */ 28d97d5c0cSVladimir Kondratyev 29d97d5c0cSVladimir Kondratyev #ifndef _HID_HGAME_H_ 30d97d5c0cSVladimir Kondratyev #define _HID_HGAME_H_ 31d97d5c0cSVladimir Kondratyev 32d97d5c0cSVladimir Kondratyev #include <dev/hid/hidmap.h> 33d97d5c0cSVladimir Kondratyev 34*51b22161SGreg V hidmap_cb_t hgame_hat_switch_cb; 35d97d5c0cSVladimir Kondratyev hidmap_cb_t hgame_dpad_cb; 36d97d5c0cSVladimir Kondratyev hidmap_cb_t hgame_final_cb; 37d97d5c0cSVladimir Kondratyev 38d97d5c0cSVladimir Kondratyev struct hgame_softc { 39d97d5c0cSVladimir Kondratyev struct hidmap hm; 40d97d5c0cSVladimir Kondratyev bool dpad_up; 41d97d5c0cSVladimir Kondratyev bool dpad_down; 42d97d5c0cSVladimir Kondratyev bool dpad_right; 43d97d5c0cSVladimir Kondratyev bool dpad_left; 44d97d5c0cSVladimir Kondratyev }; 45d97d5c0cSVladimir Kondratyev 46d97d5c0cSVladimir Kondratyev #endif /* !_HGAME_H_ */ 47