diff --git a/dev_in.c b/dev_in.c index 5d66641..9756f51 100644 --- a/dev_in.c +++ b/dev_in.c @@ -312,7 +312,10 @@ void* dev_in_thread_func(void *ptr) { if (out_msg.type == OUT_MSG_TYPE_RUMBLE) { handle_rumble(devices, max_devices, &out_msg.data.rumble); } else if (out_msg.type == OUT_MSG_TYPE_LEDS) { - // TODO: handle LEDs + // first inform the platform + dev_in_data->input_dev_decl->leds_fn(out_msg.data.leds.r, out_msg.data.leds.g, out_msg.data.leds.b, platform_data); + + // TODO: handle_leds() } } else { fprintf(stderr, "Error reading from out_message_pipe_fd: got %zu bytes, expected %zu butes\n", out_message_pipe_read_res, sizeof(out_message_t)); diff --git a/rog_ally.c b/rog_ally.c index 67b530e..bcb2ecf 100644 --- a/rog_ally.c +++ b/rog_ally.c @@ -549,7 +549,7 @@ static void rc71l_platform_deinit(void** platform_data) { } static int rc71l_platform_leds(uint8_t r, uint8_t g, uint8_t b, void* platform_data) { - + return -EINVAL; } input_dev_composite_t rc71l_composite = { @@ -561,6 +561,9 @@ input_dev_composite_t rc71l_composite = { &in_asus_kb_3_dev, }, .dev_count = 5, + .init_fn = rc71l_platform_init, + .deinit_fn = rc71l_platform_deinit, + .leds_fn = rc71l_platform_leds, }; input_dev_composite_t* rog_ally_device_def(const controller_settings_t *const settings) {