Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set protocol based on rc_keymap #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cc_binary {
name: "ir-keytable",
proprietary: true,
srcs: ["keytable.c"],
}
8 changes: 0 additions & 8 deletions Android.mk

This file was deleted.

10 changes: 1 addition & 9 deletions keytable.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ static const char doc[] = {

};

static const char args_doc[] = {
"--device [/dev/input/event* device]\n"
"--sysdev [ir class (f. ex. rc0)]\n"
"[for using the rc0 sysdev]"};

struct input_keymap_entry_v2 {
#define KEYMAP_BY_INDEX (1 << 0)
u_int8_t flags;
Expand Down Expand Up @@ -236,7 +231,6 @@ static int parse_code(char *string)
const char *argp_program_version = "IR keytable control version " V4L_UTILS_VERSION;
const char *argp_program_bug_address = "Mauro Carvalho Chehab <[email protected]>";

static int print_version = 0;
static const struct option long_options[] = {
{"verbose", no_argument, 0, 'v'},
{"clear", no_argument, 0, 'c'},
Expand Down Expand Up @@ -480,10 +474,8 @@ static int parse_opt(int argc, char* argv[])
long key;
int rc;
int c;
int digit_optind = 0;

while (1) {
int this_option_optind = optind ? optind : 1;
int option_index = 0;
c = getopt_long(argc, argv, "vtcD:P:Ad:s:rw:a:k:p:d:f:V",long_options, &option_index);
if (c == -1)
Expand Down Expand Up @@ -1294,7 +1286,7 @@ static void test_event(int fd)
return;
}

for (i = 0; i < rd / sizeof(struct input_event); i++) {
for (i = 0; i < rd / (int) sizeof(struct input_event); i++) {
printf(_("%ld.%06ld: event type %s(0x%02x)"),
ev[i].time.tv_sec, ev[i].time.tv_usec,
get_event_name(events_type, ev[i].type), ev[i].type);
Expand Down