chore: Apply code formatting on entire codebase for consistent style
This commit is contained in:
@@ -34,9 +34,7 @@ static struct ac_io_emu_hdxs com4_hdxs;
|
||||
static struct ac_io_emu_icca com4_icca[2];
|
||||
|
||||
static uint32_t check_panel_light(
|
||||
const struct ac_io_hdxs_output *output,
|
||||
uint8_t panel_idx,
|
||||
uint8_t out_idx)
|
||||
const struct ac_io_hdxs_output *output, uint8_t panel_idx, uint8_t out_idx)
|
||||
{
|
||||
if (output->lights[panel_idx].bit) {
|
||||
return 1 << out_idx;
|
||||
@@ -45,7 +43,8 @@ static uint32_t check_panel_light(
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t upscale_light(uint8_t in_7bit) {
|
||||
static uint8_t upscale_light(uint8_t in_7bit)
|
||||
{
|
||||
if (in_7bit < 0x10) {
|
||||
return in_7bit * 2;
|
||||
} else {
|
||||
@@ -54,18 +53,24 @@ static uint8_t upscale_light(uint8_t in_7bit) {
|
||||
}
|
||||
}
|
||||
|
||||
static void lights_dispatcher(
|
||||
struct ac_io_emu_hdxs *emu, const struct ac_io_message *req)
|
||||
static void
|
||||
lights_dispatcher(struct ac_io_emu_hdxs *emu, const struct ac_io_message *req)
|
||||
{
|
||||
const struct ac_io_hdxs_output *output = &req->cmd.hdxs_output;
|
||||
|
||||
uint32_t lights = 0;
|
||||
lights |= check_panel_light(output, AC_IO_HDXS_OUT_P1_START, LIGHT_HD_P1_START);
|
||||
lights |= check_panel_light(output, AC_IO_HDXS_OUT_P1_UP_DOWN, LIGHT_HD_P1_UP_DOWN);
|
||||
lights |= check_panel_light(output, AC_IO_HDXS_OUT_P1_LEFT_RIGHT, LIGHT_HD_P1_LEFT_RIGHT);
|
||||
lights |= check_panel_light(output, AC_IO_HDXS_OUT_P2_START, LIGHT_HD_P2_START);
|
||||
lights |= check_panel_light(output, AC_IO_HDXS_OUT_P2_UP_DOWN, LIGHT_HD_P2_UP_DOWN);
|
||||
lights |= check_panel_light(output, AC_IO_HDXS_OUT_P2_LEFT_RIGHT, LIGHT_HD_P2_LEFT_RIGHT);
|
||||
lights |=
|
||||
check_panel_light(output, AC_IO_HDXS_OUT_P1_START, LIGHT_HD_P1_START);
|
||||
lights |= check_panel_light(
|
||||
output, AC_IO_HDXS_OUT_P1_UP_DOWN, LIGHT_HD_P1_UP_DOWN);
|
||||
lights |= check_panel_light(
|
||||
output, AC_IO_HDXS_OUT_P1_LEFT_RIGHT, LIGHT_HD_P1_LEFT_RIGHT);
|
||||
lights |=
|
||||
check_panel_light(output, AC_IO_HDXS_OUT_P2_START, LIGHT_HD_P2_START);
|
||||
lights |= check_panel_light(
|
||||
output, AC_IO_HDXS_OUT_P2_UP_DOWN, LIGHT_HD_P2_UP_DOWN);
|
||||
lights |= check_panel_light(
|
||||
output, AC_IO_HDXS_OUT_P2_LEFT_RIGHT, LIGHT_HD_P2_LEFT_RIGHT);
|
||||
|
||||
ddr_io_set_lights_hdxs_panel(lights);
|
||||
|
||||
@@ -73,9 +78,12 @@ static void lights_dispatcher(
|
||||
size_t light_idx = i * 3;
|
||||
|
||||
// these are 7 bit, upscale them to 8 bit
|
||||
uint8_t r = upscale_light(output->lights[light_idx + AC_IO_HDXS_RED].analog);
|
||||
uint8_t g = upscale_light(output->lights[light_idx + AC_IO_HDXS_GREEN].analog);
|
||||
uint8_t b = upscale_light(output->lights[light_idx + AC_IO_HDXS_BLUE].analog);
|
||||
uint8_t r =
|
||||
upscale_light(output->lights[light_idx + AC_IO_HDXS_RED].analog);
|
||||
uint8_t g =
|
||||
upscale_light(output->lights[light_idx + AC_IO_HDXS_GREEN].analog);
|
||||
uint8_t b =
|
||||
upscale_light(output->lights[light_idx + AC_IO_HDXS_BLUE].analog);
|
||||
|
||||
ddr_io_set_lights_hdxs_rgb(i, r, g, b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user