Skip to content

Commit 2716695

Browse files
committed
clean
1 parent 118e55f commit 2716695

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/pico_servo.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ uint max;
1818

1919
static int slice_map[30];
2020
static uint slice_active[8];
21-
static void (*pwm_cb[8])(void);
2221
static uint servo_pos[32];
2322
static uint servo_pos_buf[16];
2423
static pwm_config slice_cfg[8];
@@ -65,8 +64,6 @@ int servo_attach(uint pin)
6564
return 1;
6665
}
6766

68-
printf("slice: %d\n", slice);
69-
7067
gpio_set_function(pin, GPIO_FUNC_PWM);
7168
slice_map[pin] = slice;
7269

@@ -79,6 +76,7 @@ int servo_attach(uint pin)
7976
pwm_config_set_wrap(&slice_cfg[slice], WRAP);
8077
pwm_config_set_clkdiv(&slice_cfg[slice], clkdiv);
8178
pwm_init(slice, &slice_cfg[slice], true);
79+
pwm_set_chan_level(slice, pin % 2, 90);
8280
}
8381

8482
++slice_active[slice];

0 commit comments

Comments
 (0)