Skip to content

Commit 98045cc

Browse files
committed
修正&実機で動作確認完了
1 parent f5c7139 commit 98045cc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/drivers/rtmouse_dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ static void set_motor_freq(int freq, const int dev_side)
270270
if (dev_side == DEV_LEFT) {
271271
motor_l_freq_is_positive = 0;
272272
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_L_BASE);
273+
freq = -freq;
273274
} else if (dev_side == DEV_RIGHT) {
274275
motor_r_freq_is_positive = 0;
275276
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);

src/drivers/rtmouse_i2c.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ static int rtcnt_i2c_probe(struct i2c_client *client,
215215

216216
/* create character device */
217217
if ((int)(id->driver_data) == 0) {
218-
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTL))
218+
if (rtcnt_i2c_create_cdev(dev_info, DEV_LEFT))
219219
return -ENOMEM;
220220
} else if ((int)(id->driver_data) == 1) {
221-
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTR))
221+
if (rtcnt_i2c_create_cdev(dev_info, DEV_RIGHT))
222222
return -ENOMEM;
223223
}
224224

@@ -256,10 +256,10 @@ static int rtcnt_i2c_probe(struct i2c_client *client)
256256

257257
/* create character device */
258258
if ((int)(id->driver_data) == 0) {
259-
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTL))
259+
if (rtcnt_i2c_create_cdev(dev_info, DEV_LEFT))
260260
return -ENOMEM;
261261
} else if ((int)(id->driver_data) == 1) {
262-
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTR))
262+
if (rtcnt_i2c_create_cdev(dev_info, DEV_RIGHT))
263263
return -ENOMEM;
264264
}
265265

0 commit comments

Comments
 (0)