Skip to content

Commit 748f089

Browse files
committed
motor_motion_*関数は使用されていないので削除
1 parent c889dba commit 748f089

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

src/drivers/rtmouse.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -190,60 +190,6 @@ static struct i2c_driver i2c_counter_driver = {
190190
MODULE_DEVICE_TABLE(spi, mcp3204_id);
191191
MODULE_DEVICE_TABLE(i2c, i2c_counter_id);
192192

193-
#define MOTOR_MOTION 0
194-
#if MOTOR_MOTION
195-
/* Variable Type Definition for motor motion */
196-
typedef struct {
197-
signed int r_hz;
198-
signed int l_hz;
199-
unsigned int time;
200-
} t_motor_motion;
201-
202-
#define MAX_MOTORBUFLEN 16
203-
static t_motor_motion motor_motion[MAX_MOTORBUFLEN];
204-
static unsigned int motor_motion_head = 0, motor_motion_tail = 0;
205-
206-
static int motor_motion_push(int r_hz, int l_hz, int time)
207-
{
208-
unsigned int next_tail = motor_motion_tail + 1;
209-
210-
if (next_tail >= MAX_MOTORBUFLEN) {
211-
next_tail = 0;
212-
}
213-
214-
if (next_tail == motor_motion_head) {
215-
return -1;
216-
}
217-
218-
motor_motion[motor_motion_tail].r_hz = r_hz;
219-
motor_motion[motor_motion_tail].l_hz = l_hz;
220-
motor_motion[motor_motion_tail].time = time;
221-
222-
motor_motion_tail = next_tail;
223-
224-
return 0;
225-
}
226-
227-
static int motor_motion_pop(t_motor_motion **ret)
228-
{
229-
unsigned int next_head = motor_motion_head + 1;
230-
231-
if (motor_motion_tail == motor_motion_head) {
232-
return -1;
233-
}
234-
235-
if (next_head >= MAX_MOTORBUFLEN) {
236-
next_head = 0;
237-
}
238-
239-
*ret = (motor_motion + motor_motion_head);
240-
241-
motor_motion_head = next_head;
242-
243-
return 0;
244-
}
245-
#endif
246-
247193
/* --- GPIO Operation --- */
248194
/* getPWMCount function for GPIO Operation */
249195
static int getPWMCount(int freq)

0 commit comments

Comments
 (0)