/* mx5500-set * Tool to control the extra features of the Logitech MX 5500 bluetooth keyboard in hci mod based on Hidraw * * Copyright (c) 2013 Julian Sparber * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MX5500_H #define MX5500_H /* Linux */ #include #include #include /* * Ugly hack to work around failing compilation on systems that don't * yet populate new version of hidraw.h to userspace. */ #ifndef HIDIOCSFEATURE #warning Please have your distro update the userspace kernel headers #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len) #define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len) #endif /* Unix */ #include #include #include #include #include /* C */ #include #include #include #include #include #include int open_device(int fd); const char *bus_str(int bus); int set_time(int fd); int beep(int fd); int set_temp_unit(int fd, char unit, char mode); int no_arg(); #endif /* MX5500_H */