Skip to content

Commit

Permalink
修正&実機で動作確認完了
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeKato committed Nov 19, 2024
1 parent f5c7139 commit 98045cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/drivers/rtmouse_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ static void set_motor_freq(int freq, const int dev_side)
if (dev_side == DEV_LEFT) {
motor_l_freq_is_positive = 0;
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_L_BASE);
freq = -freq;
} else if (dev_side == DEV_RIGHT) {
motor_r_freq_is_positive = 0;
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
Expand Down
8 changes: 4 additions & 4 deletions src/drivers/rtmouse_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ static int rtcnt_i2c_probe(struct i2c_client *client,

/* create character device */
if ((int)(id->driver_data) == 0) {
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTL))
if (rtcnt_i2c_create_cdev(dev_info, DEV_LEFT))
return -ENOMEM;
} else if ((int)(id->driver_data) == 1) {
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTR))
if (rtcnt_i2c_create_cdev(dev_info, DEV_RIGHT))
return -ENOMEM;
}

Expand Down Expand Up @@ -256,10 +256,10 @@ static int rtcnt_i2c_probe(struct i2c_client *client)

/* create character device */
if ((int)(id->driver_data) == 0) {
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTL))
if (rtcnt_i2c_create_cdev(dev_info, DEV_LEFT))
return -ENOMEM;
} else if ((int)(id->driver_data) == 1) {
if (rtcnt_i2c_create_cdev(dev_info, DEVNAME_CNTR))
if (rtcnt_i2c_create_cdev(dev_info, DEV_RIGHT))
return -ENOMEM;
}

Expand Down

0 comments on commit 98045cc

Please sign in to comment.