A bit more clang-format

This commit is contained in:
Jasmine Iwanek
2022-11-19 08:49:04 -05:00
parent b04dd8cc8b
commit 3fe4f75108
223 changed files with 8047 additions and 7456 deletions

View File

@@ -279,8 +279,8 @@ gl518sm_init(const device_t *info)
},
{
/* voltages */
hwm_get_vcore(), /* Vcore */
RESISTOR_DIVIDER(12000, 150, 47), /* +12V (15K/4.7K divider suggested in the datasheet) */
hwm_get_vcore(), /* Vcore */
RESISTOR_DIVIDER(12000, 150, 47), /* +12V (15K/4.7K divider suggested in the datasheet) */
3300, /* +3.3V */
5000 /* +5V */
}

View File

@@ -757,25 +757,25 @@ lm78_init(const device_t *info)
hwm_values_t defaults = {
{
/* fan speeds */
3000, /* usually Chassis, sometimes CPU */
3000, /* usually Chassis, sometimes CPU */
3000, /* usually CPU, sometimes Chassis */
3000 /* usually PSU, sometimes Chassis */
},
{
/* temperatures */
30, /* usually Board, sometimes Chassis */
30, /* Winbond only: usually CPU, sometimes Probe */
30, /* usually Board, sometimes Chassis */
30, /* Winbond only: usually CPU, sometimes Probe */
30 /* Winbond only: usually CPU when not the one above */
},
{
/* voltages */
hwm_get_vcore(), /* Vcore */
0, /* sometimes Vtt, Vio or second CPU */
3300, /* +3.3V */
RESISTOR_DIVIDER(5000, 11, 16), /* +5V (divider values bruteforced) */
hwm_get_vcore(), /* Vcore */
0, /* sometimes Vtt, Vio or second CPU */
3300, /* +3.3V */
RESISTOR_DIVIDER(5000, 11, 16), /* +5V (divider values bruteforced) */
RESISTOR_DIVIDER(12000, 28, 10), /* +12V (28K/10K divider suggested in the W83781D datasheet) */
LM78_NEG_VOLTAGE(12000, 2100), /* -12V */
LM78_NEG_VOLTAGE(5000, 909), /* -5V */
LM78_NEG_VOLTAGE(12000, 2100), /* -12V */
LM78_NEG_VOLTAGE(5000, 909), /* -5V */
RESISTOR_DIVIDER(5000, 51, 75), /* W83782D/AS99127F only: +5VSB (5.1K/7.5K divider suggested in the datasheet) */
3000, /* W83782D/AS99127F only: Vbat */
2500, /* AS99127F only: +2.5V */

View File

@@ -182,7 +182,7 @@ vt82c686_init(const device_t *info)
/* Set default values. Since this hardware monitor has a complex voltage factor system,
the values struct contains voltage values *before* applying their respective factors. */
hwm_values_t defaults = {
// clang-format on
// clang-format off
{ /* fan speeds */
3000, /* usually CPU */
3000 /* usually Chassis */
@@ -197,7 +197,7 @@ vt82c686_init(const device_t *info)
5000, /* +5V */
12000 /* +12V */
}
// clang-format on
// clang-format on
};
hwm_values = defaults;
dev->values = &hwm_values;

View File

@@ -1614,6 +1614,6 @@ isamem_get_from_internal_name(const char *s)
const device_t *
isamem_get_device(int board)
{
/* Add the instance to the system. */
/* Add the instance to the system. */
return boards[board].dev;
}

View File

@@ -763,7 +763,7 @@ isartc_get_from_internal_name(char *s)
c++;
}
/* Not found. */
/* Not found. */
return (0);
}

View File

@@ -430,7 +430,7 @@ kbd_adddata(uint16_t val)
/* Test for T1000 'Fn' key (Right Alt / Right Ctrl) */
if (is_t1x00) {
if (keyboard_recv(0x138) || keyboard_recv(0x11d)) { /* 'Fn' pressed */
t1000_syskey(0x00, 0x04, 0x00); /* Set 'Fn' indicator */
t1000_syskey(0x00, 0x04, 0x00); /* Set 'Fn' indicator */
switch (val) {
case 0x45: /* Num Lock => toggle numpad */
t1000_syskey(0x00, 0x00, 0x10);
@@ -515,8 +515,7 @@ static void
kbd_write(uint16_t port, uint8_t val, void *priv)
{
xtkbd_t *kbd = (xtkbd_t *) priv;
uint8_t bit, set, new_clock;
uint8_t bit, set, new_clock;
switch (port) {
case 0x61: /* Keyboard Control Register (aka Port B) */
@@ -532,7 +531,7 @@ kbd_write(uint16_t port, uint8_t val, void *priv)
kbd->pb = val;
if (!(kbd->pb & 0x80))
kbd->clock = !!(kbd->pb & 0x40);
ppi.pb = val;
ppi.pb = val;
timer_process();
@@ -570,8 +569,8 @@ kbd_write(uint16_t port, uint8_t val, void *priv)
case 0xc0 ... 0xcf: /* Pravetz Flags */
kbd_log("XTkbd: Port %02X out: %02X\n", port, val);
if (kbd->type == KBD_TYPE_PRAVETZ) {
bit = (port >> 1) & 0x07;
set = (port & 0x01) << bit;
bit = (port >> 1) & 0x07;
set = (port & 0x01) << bit;
kbd->pravetz_flags = (kbd->pravetz_flags & ~(1 << bit)) | set;
}
break;
@@ -693,10 +692,10 @@ kbd_reset(void *priv)
{
xtkbd_t *kbd = (xtkbd_t *) priv;
kbd->want_irq = 0;
kbd->blocked = 0;
kbd->pa = 0x00;
kbd->pb = 0x00;
kbd->want_irq = 0;
kbd->blocked = 0;
kbd->pa = 0x00;
kbd->pb = 0x00;
kbd->pravetz_flags = 0x00;
keyboard_scan = 1;

View File

@@ -800,7 +800,7 @@ static const device_config_t ms_config[] = {
}
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
// clang-format on
};
const device_t mouse_logibus_device = {

View File

@@ -37,8 +37,8 @@ typedef struct {
int mode;
uint16_t flags;
uint8_t resolution;
uint8_t sample_rate;
uint8_t resolution;
uint8_t sample_rate;
uint8_t command;
@@ -84,7 +84,7 @@ mouse_clear_data(void *priv)
static void
ps2_report_coordinates(mouse_t *dev)
{
uint8_t buff[3] = {0x08, 0x00, 0x00};
uint8_t buff[3] = { 0x08, 0x00, 0x00 };
if (dev->x > 255)
dev->x = 255;
@@ -248,14 +248,13 @@ mouse_reset:
dev->last_data[5] = val;
if (dev->last_data[0] == 0xf3 && dev->last_data[1] == 0xc8
&& dev->last_data[2] == 0xf3 && dev->last_data[3] == 0xc8
&& dev->last_data[4] == 0xf3 && dev->last_data[5] == 0x50
&& mouse_get_buttons() == 5) {
&& dev->last_data[2] == 0xf3 && dev->last_data[3] == 0xc8
&& dev->last_data[4] == 0xf3 && dev->last_data[5] == 0x50
&& mouse_get_buttons() == 5) {
dev->flags |= FLAG_INTMODE | FLAG_5BTN;
}
else if (dev->last_data[0] == 0xf3 && dev->last_data[1] == 0xc8
&& dev->last_data[2] == 0xf3 && dev->last_data[3] == 0x64
&& dev->last_data[4] == 0xf3 && dev->last_data[5] == 0x50) {
} else if (dev->last_data[0] == 0xf3 && dev->last_data[1] == 0xc8
&& dev->last_data[2] == 0xf3 && dev->last_data[3] == 0x64
&& dev->last_data[4] == 0xf3 && dev->last_data[5] == 0x50) {
dev->flags |= FLAG_INTMODE;
}
}
@@ -264,7 +263,7 @@ mouse_reset:
static int
ps2_poll(int x, int y, int z, int b, void *priv)
{
mouse_t *dev = (mouse_t *) priv;
mouse_t *dev = (mouse_t *) priv;
if (!x && !y && !z && (b == dev->b))
return (0xff);
@@ -310,7 +309,8 @@ mouse_ps2_init(const device_t *info)
if (i > 2)
dev->flags |= FLAG_INTELLI;
if (i == 4) i = 3;
if (i == 4)
i = 3;
/* Hook into the general AT Keyboard driver. */
keyboard_at_set_mouse(ps2_write, dev);
@@ -356,7 +356,7 @@ static const device_config_t ps2_config[] = {
{
.name = "", .description = "", .type = CONFIG_END
}
// clang-format on
// clang-format on
};
const device_t mouse_ps2_device = {

View File

@@ -878,7 +878,7 @@ static const device_config_t ltsermouse_config[] = {
}
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
// clang-format on
};
const device_t mouse_mssystems_device = {

View File

@@ -51,7 +51,7 @@ enum {
static int next_inst = 0;
static serial_device_t serial_devices[SERIAL_MAX];
//#define ENABLE_SERIAL_CONSOLE 1
// #define ENABLE_SERIAL_CONSOLE 1
#ifdef ENABLE_SERIAL_LOG
int serial_do_log = ENABLE_SERIAL_LOG;