Skip to content

Commit f197d93

Browse files
committed
rtmouse.hをlintの対象に追加
1 parent 9e2bd61 commit f197d93

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

.test/lint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SRC_DIR=$(cd $(dirname ${BASH_SOURCE:-$0}); cd ../; pwd)
77
lint_driver () {
88
pushd $SRC_DIR/src/drivers
99
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse.c
10+
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse.h
1011
popd
1112
}
1213

@@ -25,4 +26,4 @@ check_driver_version () {
2526

2627

2728
lint_driver
28-
check_driver_version
29+
check_driver_version

src/drivers/rtmouse.h

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,29 @@ const unsigned int NUM_DEV[ID_DEV_SIZE] = {
5151
[ID_DEV_MOTOREN] = 1, [ID_DEV_MOTOR] = 1, [ID_DEV_CNT] = 2};
5252

5353
/* --- Device Names --- */
54-
const char *NAME_DEV[ID_DEV_SIZE] = {
55-
[ID_DEV_LED] = "rtled",
56-
[ID_DEV_SWITCH] = "rtswitch",
57-
[ID_DEV_SENSOR] = "rtlightsensor",
58-
[ID_DEV_BUZZER] = "rtbuzzer",
59-
[ID_DEV_MOTORRAWR] = "rtmotor_raw_r",
60-
[ID_DEV_MOTORRAWL] = "rtmotor_raw_l",
61-
[ID_DEV_MOTOREN] = "rtmotoren",
62-
[ID_DEV_MOTOR] = "rtmotor"};
63-
64-
const char *NAME_DEV_U[ID_DEV_SIZE] = {
65-
[ID_DEV_LED] = "rtled%u",
66-
[ID_DEV_SWITCH] = "rtswitch%u",
67-
[ID_DEV_SENSOR] = "rtlightsensor%u",
68-
[ID_DEV_BUZZER] = "rtbuzzer%u",
69-
[ID_DEV_MOTORRAWR] = "rtmotor_raw_r%u",
70-
[ID_DEV_MOTORRAWL] = "rtmotor_raw_l%u",
71-
[ID_DEV_MOTOREN] = "rtmotoren%u",
72-
[ID_DEV_MOTOR] = "rtmotor%u"};
54+
const char *NAME_DEV[ID_DEV_SIZE] = {[ID_DEV_LED] = "rtled",
55+
[ID_DEV_SWITCH] = "rtswitch",
56+
[ID_DEV_SENSOR] = "rtlightsensor",
57+
[ID_DEV_BUZZER] = "rtbuzzer",
58+
[ID_DEV_MOTORRAWR] = "rtmotor_raw_r",
59+
[ID_DEV_MOTORRAWL] = "rtmotor_raw_l",
60+
[ID_DEV_MOTOREN] = "rtmotoren",
61+
[ID_DEV_MOTOR] = "rtmotor"};
62+
63+
const char *NAME_DEV_U[ID_DEV_SIZE] = {[ID_DEV_LED] = "rtled%u",
64+
[ID_DEV_SWITCH] = "rtswitch%u",
65+
[ID_DEV_SENSOR] = "rtlightsensor%u",
66+
[ID_DEV_BUZZER] = "rtbuzzer%u",
67+
[ID_DEV_MOTORRAWR] = "rtmotor_raw_r%u",
68+
[ID_DEV_MOTORRAWL] = "rtmotor_raw_l%u",
69+
[ID_DEV_MOTOREN] = "rtmotoren%u",
70+
[ID_DEV_MOTOR] = "rtmotor%u"};
7371

7472
#define NUM_DEV_TOTAL \
75-
(NUM_DEV[ID_DEV_LED] + NUM_DEV[ID_DEV_SWITCH] + \
76-
NUM_DEV[ID_DEV_SENSOR] + NUM_DEV[ID_DEV_BUZZER] + \
77-
NUM_DEV[ID_DEV_MOTORRAWR] + NUM_DEV[ID_DEV_MOTORRAWL] + \
78-
NUM_DEV[ID_DEV_MOTOREN] + NUM_DEV[ID_DEV_MOTOR])
73+
(NUM_DEV[ID_DEV_LED] + NUM_DEV[ID_DEV_SWITCH] + \
74+
NUM_DEV[ID_DEV_SENSOR] + NUM_DEV[ID_DEV_BUZZER] + \
75+
NUM_DEV[ID_DEV_MOTORRAWR] + NUM_DEV[ID_DEV_MOTORRAWL] + \
76+
NUM_DEV[ID_DEV_MOTOREN] + NUM_DEV[ID_DEV_MOTOR])
7977

8078
#define DEVNAME_SENSOR "rtlightsensor"
8179
#define DEVNAME_CNTR "rtcounter_r"

0 commit comments

Comments
 (0)