Home
last modified time | relevance | path

Searched refs:timer_periph (Results 1 – 16 of 16) sorted by relevance

/hal_gigadevice-latest/gd32f3x0/standard_peripheral/source/
Dgd32f3x0_timer.c46 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
48 switch(timer_periph){ in timer_deinit()
126 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara) in gd32_timer_init() argument
129 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
132 if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph)){ in gd32_timer_init()
133 TIMER_CTL0(timer_periph) &= ~(uint32_t)(TIMER_CTL0_DIR|TIMER_CTL0_CAM); in gd32_timer_init()
134 TIMER_CTL0(timer_periph) |= (uint32_t)initpara->alignedmode; in gd32_timer_init()
135 TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; in gd32_timer_init()
139 TIMER_CAR(timer_periph) = (uint32_t)initpara->period; in gd32_timer_init()
141 …if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph) || (TIMER13 ==… in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32a50x/standard_peripheral/source/
Dgd32a50x_timer.c48 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
50 switch(timer_periph) { in timer_deinit()
121 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct *initpara) in gd32_timer_init() argument
124 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
127 if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER7 == timer_periph) in gd32_timer_init()
128 || (TIMER19 == timer_periph) || (TIMER20 == timer_periph)) { in gd32_timer_init()
129 TIMER_CTL0(timer_periph) &= (~(uint32_t)(TIMER_CTL0_DIR | TIMER_CTL0_CAM)); in gd32_timer_init()
130 TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->alignedmode & ALIGNEDMODE_MASK); in gd32_timer_init()
131 TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->counterdirection & COUNTERDIRECTION_MASK); in gd32_timer_init()
135 TIMER_CAR(timer_periph) = (uint32_t)initpara->period; in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32f4xx/standard_peripheral/source/
Dgd32f4xx_timer.c47 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
49 switch(timer_periph) { in timer_deinit()
155 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct *initpara) in gd32_timer_init() argument
158 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
161 if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph) in gd32_timer_init()
162 || (TIMER3 == timer_periph) || (TIMER4 == timer_periph) || (TIMER7 == timer_periph)) { in gd32_timer_init()
163 TIMER_CTL0(timer_periph) &= ~(uint32_t)(TIMER_CTL0_DIR | TIMER_CTL0_CAM); in gd32_timer_init()
164 TIMER_CTL0(timer_periph) |= (uint32_t)initpara->alignedmode; in gd32_timer_init()
165 TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; in gd32_timer_init()
169 TIMER_CAR(timer_periph) = (uint32_t)initpara->period; in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32e50x/standard_peripheral/source/
Dgd32e50x_timer.c50 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
52 switch(timer_periph){ in timer_deinit()
160 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara) in gd32_timer_init() argument
163 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
166 if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph) in gd32_timer_init()
167 || (TIMER3 == timer_periph) || (TIMER4 == timer_periph) || (TIMER7 == timer_periph)){ in gd32_timer_init()
168 TIMER_CTL0(timer_periph) &= (~(uint32_t)(TIMER_CTL0_DIR | TIMER_CTL0_CAM)); in gd32_timer_init()
169 TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->alignedmode & ALIGNEDMODE_MASK); in gd32_timer_init()
170 …TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->counterdirection & COUNTERDIRECTION_MASK); … in gd32_timer_init()
174 TIMER_CAR(timer_periph) = (uint32_t)initpara->period; in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32e10x/standard_peripheral/source/
Dgd32e10x_timer.c51 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
53 switch(timer_periph){ in timer_deinit()
160 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara) in gd32_timer_init() argument
163 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
166 if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph) in gd32_timer_init()
167 || (TIMER3 == timer_periph) || (TIMER4 == timer_periph) || (TIMER7 == timer_periph)){ in gd32_timer_init()
168 TIMER_CTL0(timer_periph) &= (~(uint32_t)(TIMER_CTL0_DIR | TIMER_CTL0_CAM)); in gd32_timer_init()
169 TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->alignedmode & ALIGNEDMODE_MASK); in gd32_timer_init()
170 …TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->counterdirection & COUNTERDIRECTION_MASK); … in gd32_timer_init()
174 TIMER_CAR(timer_periph) = (uint32_t)initpara->period; in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32f403/standard_peripheral/source/
Dgd32f403_timer.c45 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
47 switch(timer_periph){ in timer_deinit()
143 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara) in gd32_timer_init() argument
146 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
149 if((TIMER0 == timer_periph) || (TIMER2 == timer_periph) in gd32_timer_init()
150 || (TIMER3 == timer_periph) || (TIMER7 == timer_periph)){ in gd32_timer_init()
151 TIMER_CTL0(timer_periph) &= ~(uint32_t)(TIMER_CTL0_DIR|TIMER_CTL0_CAM); in gd32_timer_init()
152 TIMER_CTL0(timer_periph) |= (uint32_t)initpara->alignedmode; in gd32_timer_init()
153 TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; in gd32_timer_init()
157 TIMER_CAR(timer_periph) = (uint32_t)initpara->period; in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32vf103/standard_peripheral/source/
Dgd32vf103_timer.c48 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
50 switch(timer_periph){ in timer_deinit()
123 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara) in gd32_timer_init() argument
126 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
129 if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph) in gd32_timer_init()
130 || (TIMER3 == timer_periph) || (TIMER4 == timer_periph) ){ in gd32_timer_init()
131 TIMER_CTL0(timer_periph) &= (~(uint32_t)(TIMER_CTL0_DIR | TIMER_CTL0_CAM)); in gd32_timer_init()
132 TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->alignedmode & ALIGNEDMODE_MASK); in gd32_timer_init()
133 …TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->counterdirection & COUNTERDIRECTION_MASK); … in gd32_timer_init()
135 TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR); in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32l23x/standard_peripheral/source/
Dgd32l23x_timer.c43 void timer_deinit(uint32_t timer_periph) in timer_deinit() argument
45 switch(timer_periph) { in timer_deinit()
109 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct *initpara) in gd32_timer_init() argument
112 TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; in gd32_timer_init()
115 if((TIMER1 == timer_periph) || (TIMER2 == timer_periph)) { in gd32_timer_init()
116 TIMER_CTL0(timer_periph) &= (~(uint32_t)(TIMER_CTL0_DIR | TIMER_CTL0_CAM)); in gd32_timer_init()
117 TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->alignedmode); in gd32_timer_init()
118 TIMER_CTL0(timer_periph) |= (uint32_t)(initpara->counterdirection); in gd32_timer_init()
122 TIMER_CAR(timer_periph) = (uint32_t)initpara->period; in gd32_timer_init()
124 if(TIMER5 != timer_periph) { in gd32_timer_init()
[all …]
/hal_gigadevice-latest/gd32f3x0/standard_peripheral/include/
Dgd32f3x0_timer.h608 void timer_deinit(uint32_t timer_periph);
612 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara);
614 void timer_enable(uint32_t timer_periph);
616 void timer_disable(uint32_t timer_periph);
618 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
620 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
622 void timer_update_event_enable(uint32_t timer_periph);
624 void timer_update_event_disable(uint32_t timer_periph);
626 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
628 void timer_counter_up_direction(uint32_t timer_periph);
[all …]
/hal_gigadevice-latest/gd32f4xx/standard_peripheral/include/
Dgd32f4xx_timer.h621 void timer_deinit(uint32_t timer_periph);
625 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara);
627 void timer_enable(uint32_t timer_periph);
629 void timer_disable(uint32_t timer_periph);
631 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
633 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
635 void timer_update_event_enable(uint32_t timer_periph);
637 void timer_update_event_disable(uint32_t timer_periph);
639 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
641 void timer_counter_up_direction(uint32_t timer_periph);
[all …]
/hal_gigadevice-latest/gd32e50x/standard_peripheral/include/
Dgd32e50x_timer.h599 void timer_deinit(uint32_t timer_periph);
603 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara);
605 void timer_enable(uint32_t timer_periph);
607 void timer_disable(uint32_t timer_periph);
609 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
611 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
613 void timer_update_event_enable(uint32_t timer_periph);
615 void timer_update_event_disable(uint32_t timer_periph);
617 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
619 void timer_counter_up_direction(uint32_t timer_periph);
[all …]
/hal_gigadevice-latest/gd32f403/standard_peripheral/include/
Dgd32f403_timer.h593 void timer_deinit(uint32_t timer_periph);
597 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara);
599 void timer_enable(uint32_t timer_periph);
601 void timer_disable(uint32_t timer_periph);
603 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
605 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
607 void timer_update_event_enable(uint32_t timer_periph);
609 void timer_update_event_disable(uint32_t timer_periph);
611 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
613 void timer_counter_up_direction(uint32_t timer_periph);
[all …]
/hal_gigadevice-latest/gd32e10x/standard_peripheral/include/
Dgd32e10x_timer.h590 void timer_deinit(uint32_t timer_periph);
594 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara);
596 void timer_enable(uint32_t timer_periph);
598 void timer_disable(uint32_t timer_periph);
600 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
602 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
604 void timer_update_event_enable(uint32_t timer_periph);
606 void timer_update_event_disable(uint32_t timer_periph);
608 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
610 void timer_counter_up_direction(uint32_t timer_periph);
[all …]
/hal_gigadevice-latest/gd32vf103/standard_peripheral/include/
Dgd32vf103_timer.h572 void timer_deinit(uint32_t timer_periph);
576 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct* initpara);
578 void timer_enable(uint32_t timer_periph);
580 void timer_disable(uint32_t timer_periph);
582 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
584 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
586 void timer_update_event_enable(uint32_t timer_periph);
588 void timer_update_event_disable(uint32_t timer_periph);
590 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
592 void timer_counter_up_direction(uint32_t timer_periph);
[all …]
/hal_gigadevice-latest/gd32l23x/standard_peripheral/include/
Dgd32l23x_timer.h472 void timer_deinit(uint32_t timer_periph);
476 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct *initpara);
478 void timer_enable(uint32_t timer_periph);
480 void timer_disable(uint32_t timer_periph);
482 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
484 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
486 void timer_update_event_enable(uint32_t timer_periph);
488 void timer_update_event_disable(uint32_t timer_periph);
490 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
492 void timer_counter_up_direction(uint32_t timer_periph);
[all …]
/hal_gigadevice-latest/gd32a50x/standard_peripheral/include/
Dgd32a50x_timer.h936 void timer_deinit(uint32_t timer_periph);
940 void gd32_timer_init(uint32_t timer_periph, timer_parameter_struct *initpara);
942 void timer_enable(uint32_t timer_periph);
944 void timer_disable(uint32_t timer_periph);
946 void timer_auto_reload_shadow_enable(uint32_t timer_periph);
948 void timer_auto_reload_shadow_disable(uint32_t timer_periph);
950 void timer_update_event_enable(uint32_t timer_periph);
952 void timer_update_event_disable(uint32_t timer_periph);
954 void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned);
956 void timer_counter_up_direction(uint32_t timer_periph);
[all …]