diff options
Diffstat (limited to 'Smol Watch Project/My Project/driver_init.c')
-rw-r--r-- | Smol Watch Project/My Project/driver_init.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Smol Watch Project/My Project/driver_init.c b/Smol Watch Project/My Project/driver_init.c index 510f4074..3490a065 100644 --- a/Smol Watch Project/My Project/driver_init.c +++ b/Smol Watch Project/My Project/driver_init.c @@ -21,8 +21,6 @@ struct calendar_descriptor CALENDAR_0; struct i2c_m_sync_desc I2C_0; -struct pwm_descriptor PWM_0; - struct pwm_descriptor PWM_1; void ADC_0_PORT_init(void) @@ -169,14 +167,8 @@ void PWM_0_PORT_init(void) void PWM_0_CLOCK_init(void) { hri_mclk_set_APBCMASK_TC3_bit(MCLK); - hri_gclk_write_PCHCTRL_reg(GCLK, TC3_GCLK_ID, CONF_GCLK_TC3_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); -} -void PWM_0_init(void) -{ - PWM_0_CLOCK_init(); - PWM_0_PORT_init(); - pwm_init(&PWM_0, TC3, _tc_get_pwm()); + hri_gclk_write_PCHCTRL_reg(GCLK, TC3_GCLK_ID, CONF_GCLK_TC3_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); } void PWM_1_PORT_init(void) @@ -324,7 +316,10 @@ void system_init(void) delay_driver_init(); - TIMER_0_init(); + PWM_0_CLOCK_init(); + + PWM_0_PORT_init(); + PWM_0_init(); PWM_1_init(); |