Home
last modified time | relevance | path

Searched refs:ctl (Results 1 – 25 of 34) sorted by relevance

12

/hal_gigadevice-latest/gd32l23x/standard_peripheral/source/
Dgd32l23x_timer.c440 uint32_t ctl; in timer_dma_transfer_config() local
441 ctl = TIMER_DMACFG(timer_periph); in timer_dma_transfer_config()
442 ctl &= (~(uint32_t)(TIMER_DMACFG_DMATA | TIMER_DMACFG_DMATC)); in timer_dma_transfer_config()
443 ctl |= (uint32_t)(dma_baseaddr | dma_lenth); in timer_dma_transfer_config()
444 TIMER_DMACFG(timer_periph) = ctl; in timer_dma_transfer_config()
496 uint32_t ctl; in timer_channel_output_config() local
507 ctl = TIMER_CHCTL2(timer_periph); in timer_channel_output_config()
508 ctl &= (~(uint32_t)TIMER_CHCTL2_CH0P); in timer_channel_output_config()
509 ctl |= (uint32_t)ocpara->ocpolarity; in timer_channel_output_config()
510 TIMER_CHCTL2(timer_periph) = ctl; in timer_channel_output_config()
[all …]
/hal_gigadevice-latest/gd32a50x/standard_peripheral/source/
Dgd32a50x_bkp.c146 uint16_t ctl = 0U; in bkp_rtc_output_select() local
148 ctl = BKP_OCTL; in bkp_rtc_output_select()
149 ctl &= (uint16_t)~BKP_OCTL_ROSEL; in bkp_rtc_output_select()
150 ctl |= outputsel; in bkp_rtc_output_select()
151 BKP_OCTL = ctl; in bkp_rtc_output_select()
165 uint16_t ctl = 0U; in bkp_rtc_clock_output_select() local
167 ctl = BKP_OCTL; in bkp_rtc_clock_output_select()
168 ctl &= (uint16_t)~BKP_OCTL_CCOSEL; in bkp_rtc_clock_output_select()
169 ctl |= clocksel; in bkp_rtc_clock_output_select()
170 BKP_OCTL = ctl; in bkp_rtc_clock_output_select()
[all …]
/hal_gigadevice-latest/gd32f4xx/standard_peripheral/source/
Dgd32f4xx_i2c.c164 uint32_t ctl = 0U; in i2c_mode_addr_config() local
166 ctl = I2C_CTL0(i2c_periph); in i2c_mode_addr_config()
167 ctl &= ~(I2C_CTL0_SMBEN); in i2c_mode_addr_config()
168 ctl |= mode; in i2c_mode_addr_config()
169 I2C_CTL0(i2c_periph) = ctl; in i2c_mode_addr_config()
206 uint32_t ctl = 0U; in i2c_ack_config() local
208 ctl = I2C_CTL0(i2c_periph); in i2c_ack_config()
209 ctl &= ~(I2C_CTL0_ACKEN); in i2c_ack_config()
210 ctl |= ack; in i2c_ack_config()
211 I2C_CTL0(i2c_periph) = ctl; in i2c_ack_config()
[all …]
Dgd32f4xx_usart.c235 uint32_t ctl = 0U; in usart_transmit_config() local
237 ctl = USART_CTL0(usart_periph); in usart_transmit_config()
238 ctl &= ~USART_CTL0_TEN; in usart_transmit_config()
239 ctl |= txconfig; in usart_transmit_config()
241 USART_CTL0(usart_periph) = ctl; in usart_transmit_config()
256 uint32_t ctl = 0U; in usart_receive_config() local
258 ctl = USART_CTL0(usart_periph); in usart_receive_config()
259 ctl &= ~USART_CTL0_REN; in usart_receive_config()
260 ctl |= rxconfig; in usart_receive_config()
262 USART_CTL0(usart_periph) = ctl; in usart_receive_config()
[all …]
Dgd32f4xx_dma.c134 uint32_t ctl; in dma_single_data_mode_init() local
149 ctl = DMA_CHCTL(dma_periph, channelx); in dma_single_data_mode_init()
150 ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO | DMA_CHXCTL_TM); in dma_single_data_mode_init()
151ctl |= (init_struct->periph_memory_width | (init_struct->periph_memory_width << 2) | init_struct->… in dma_single_data_mode_init()
152 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_single_data_mode_init()
203 uint32_t ctl; in dma_multi_data_mode_init() local
218 ctl = DMA_CHCTL(dma_periph, channelx); in dma_multi_data_mode_init()
219ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO | DMA_CHXCTL_TM | DMA_CHXCTL_PBUR… in dma_multi_data_mode_init()
220ctl |= (init_struct->periph_width | (init_struct->memory_width) | init_struct->priority | init_str… in dma_multi_data_mode_init()
222 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_multi_data_mode_init()
[all …]
Dgd32f4xx_dac.c436 uint32_t ctl = 0U; in dac_concurrent_enable() local
437 ctl = DAC_CTL_DEN0 | DAC_CTL_DEN1; in dac_concurrent_enable()
438 DAC_CTL |= (ctl); in dac_concurrent_enable()
449 uint32_t ctl = 0U; in dac_concurrent_disable() local
450 ctl = DAC_CTL_DEN0 | DAC_CTL_DEN1; in dac_concurrent_disable()
451 DAC_CTL &= (~ctl); in dac_concurrent_disable()
488 uint32_t ctl = 0U; in dac_concurrent_output_buffer_enable() local
489 ctl = DAC_CTL_DBOFF0 | DAC_CTL_DBOFF1; in dac_concurrent_output_buffer_enable()
490 DAC_CTL &= (~ctl); in dac_concurrent_output_buffer_enable()
501 uint32_t ctl = 0U; in dac_concurrent_output_buffer_disable() local
[all …]
/hal_gigadevice-latest/gd32e10x/standard_peripheral/source/
Dgd32e10x_i2c.c175 uint32_t ctl = 0U; in i2c_mode_addr_config() local
177 ctl = I2C_CTL0(i2c_periph); in i2c_mode_addr_config()
178 ctl &= ~(I2C_CTL0_SMBEN); in i2c_mode_addr_config()
179 ctl |= mode; in i2c_mode_addr_config()
180 I2C_CTL0(i2c_periph) = ctl; in i2c_mode_addr_config()
217 uint32_t ctl = 0U; in i2c_ack_config() local
219 ctl = I2C_CTL0(i2c_periph); in i2c_ack_config()
220 ctl &= ~(I2C_CTL0_ACKEN); in i2c_ack_config()
221 ctl |= ack; in i2c_ack_config()
222 I2C_CTL0(i2c_periph) = ctl; in i2c_ack_config()
[all …]
Dgd32e10x_bkp.c154 uint16_t ctl = 0U; in bkp_rtc_output_select() local
157 ctl = BKP_OCTL; in bkp_rtc_output_select()
158 ctl &= (uint16_t)~BKP_OCTL_ROSEL; in bkp_rtc_output_select()
159 ctl |= outputsel; in bkp_rtc_output_select()
160 BKP_OCTL = ctl; in bkp_rtc_output_select()
174 uint16_t ctl = 0U; in bkp_rtc_clock_output_select() local
177 ctl = BKP_OCTL; in bkp_rtc_clock_output_select()
178 ctl &= (uint16_t)~BKP_OCTL_CCOSEL; in bkp_rtc_clock_output_select()
179 ctl |= clocksel; in bkp_rtc_clock_output_select()
180 BKP_OCTL = ctl; in bkp_rtc_clock_output_select()
[all …]
Dgd32e10x_usart.c217 uint32_t ctl = 0U; in usart_transmit_config() local
219 ctl = USART_CTL0(usart_periph); in usart_transmit_config()
220 ctl &= ~USART_CTL0_TEN; in usart_transmit_config()
221 ctl |= txconfig; in usart_transmit_config()
223 USART_CTL0(usart_periph) = ctl; in usart_transmit_config()
238 uint32_t ctl = 0U; in usart_receive_config() local
240 ctl = USART_CTL0(usart_periph); in usart_receive_config()
241 ctl &= ~USART_CTL0_REN; in usart_receive_config()
242 ctl |= rxconfig; in usart_receive_config()
244 USART_CTL0(usart_periph) = ctl; in usart_receive_config()
[all …]
Dgd32e10x_dma.c118 uint32_t ctl; in dma_init() local
134 ctl = DMA_CHCTL(dma_periph, channelx); in dma_init()
135 ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO); in dma_init()
136 ctl |= (init_struct->periph_width | init_struct->memory_width | init_struct->priority); in dma_init()
137 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_init()
373 uint32_t ctl; in dma_priority_config() local
380 ctl = DMA_CHCTL(dma_periph, channelx); in dma_priority_config()
382 ctl &= ~DMA_CHXCTL_PRIO; in dma_priority_config()
383 ctl |= priority; in dma_priority_config()
384 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_priority_config()
[all …]
/hal_gigadevice-latest/gd32vf103/standard_peripheral/source/
Dgd32vf103_i2c.c172 uint32_t ctl = 0U; in i2c_mode_addr_config() local
174 ctl = I2C_CTL0(i2c_periph); in i2c_mode_addr_config()
175 ctl &= ~(I2C_CTL0_SMBEN); in i2c_mode_addr_config()
176 ctl |= mode; in i2c_mode_addr_config()
177 I2C_CTL0(i2c_periph) = ctl; in i2c_mode_addr_config()
369 uint32_t ctl = 0U; in i2c_dma_enable() local
371 ctl = I2C_CTL1(i2c_periph); in i2c_dma_enable()
372 ctl &= ~(I2C_CTL1_DMAON); in i2c_dma_enable()
373 ctl |= dmastate; in i2c_dma_enable()
374 I2C_CTL1(i2c_periph) = ctl; in i2c_dma_enable()
[all …]
Dgd32vf103_usart.c211 uint32_t ctl = 0U; in usart_transmit_config() local
213 ctl = USART_CTL0(usart_periph); in usart_transmit_config()
214 ctl &= ~USART_CTL0_TEN; in usart_transmit_config()
215 ctl |= txconfig; in usart_transmit_config()
217 USART_CTL0(usart_periph) = ctl; in usart_transmit_config()
232 uint32_t ctl = 0U; in usart_receive_config() local
234 ctl = USART_CTL0(usart_periph); in usart_receive_config()
235 ctl &= ~USART_CTL0_REN; in usart_receive_config()
236 ctl |= rxconfig; in usart_receive_config()
238 USART_CTL0(usart_periph) = ctl; in usart_receive_config()
[all …]
Dgd32vf103_bkp.c152 uint16_t ctl = 0U; in bkp_rtc_output_select() local
155 ctl = BKP_OCTL; in bkp_rtc_output_select()
156 ctl &= (uint16_t)~BKP_OCTL_ROSEL; in bkp_rtc_output_select()
157 ctl |= outputsel; in bkp_rtc_output_select()
158 BKP_OCTL = ctl; in bkp_rtc_output_select()
170 uint16_t ctl; in bkp_rtc_calibration_value_set() local
173 ctl = BKP_OCTL; in bkp_rtc_calibration_value_set()
174 ctl &= (uint16_t)~BKP_OCTL_RCCV; in bkp_rtc_calibration_value_set()
175 ctl |= (uint16_t)OCTL_RCCV(value); in bkp_rtc_calibration_value_set()
176 BKP_OCTL = ctl; in bkp_rtc_calibration_value_set()
[all …]
Dgd32vf103_dma.c112 uint32_t ctl; in dma_init() local
128 ctl = DMA_CHCTL(dma_periph, channelx); in dma_init()
129 ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO); in dma_init()
130 ctl |= (init_struct->periph_width | init_struct->memory_width | init_struct->priority); in dma_init()
131 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_init()
366 uint32_t ctl; in dma_priority_config() local
373 ctl = DMA_CHCTL(dma_periph, channelx); in dma_priority_config()
375 ctl &= ~DMA_CHXCTL_PRIO; in dma_priority_config()
376 ctl |= priority; in dma_priority_config()
377 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_priority_config()
[all …]
Dgd32vf103_dac.c434 uint32_t ctl = 0U; in dac_concurrent_enable() local
435 ctl = DAC_CTL_DEN0 | DAC_CTL_DEN1; in dac_concurrent_enable()
436 DAC_CTL |= (ctl); in dac_concurrent_enable()
447 uint32_t ctl = 0U; in dac_concurrent_disable() local
448 ctl = DAC_CTL_DEN0 | DAC_CTL_DEN1; in dac_concurrent_disable()
449 DAC_CTL &= (~ctl); in dac_concurrent_disable()
486 uint32_t ctl = 0U; in dac_concurrent_output_buffer_enable() local
487 ctl = DAC_CTL_DBOFF0 | DAC_CTL_DBOFF1; in dac_concurrent_output_buffer_enable()
488 DAC_CTL &= (~ctl); in dac_concurrent_output_buffer_enable()
499 uint32_t ctl = 0U; in dac_concurrent_output_buffer_disable() local
[all …]
/hal_gigadevice-latest/gd32f403/standard_peripheral/source/
Dgd32f403_i2c.c181 uint32_t ctl = 0U; in i2c_mode_addr_config() local
183 ctl = I2C_CTL0(i2c_periph); in i2c_mode_addr_config()
184 ctl &= ~(I2C_CTL0_SMBEN); in i2c_mode_addr_config()
185 ctl |= mode; in i2c_mode_addr_config()
186 I2C_CTL0(i2c_periph) = ctl; in i2c_mode_addr_config()
378 uint32_t ctl = 0U; in i2c_dma_enable() local
380 ctl = I2C_CTL1(i2c_periph); in i2c_dma_enable()
381 ctl &= ~(I2C_CTL1_DMAON); in i2c_dma_enable()
382 ctl |= dmastate; in i2c_dma_enable()
383 I2C_CTL1(i2c_periph) = ctl; in i2c_dma_enable()
[all …]
Dgd32f403_bkp.c149 uint16_t ctl = 0U; in bkp_rtc_output_select() local
151 ctl = BKP_OCTL; in bkp_rtc_output_select()
152 ctl &= (uint16_t)~BKP_OCTL_ROSEL; in bkp_rtc_output_select()
153 ctl |= outputsel; in bkp_rtc_output_select()
154 BKP_OCTL = ctl; in bkp_rtc_output_select()
167 uint16_t ctl = 0U; in bkp_rtc_clock_output_select() local
169 ctl = BKP_OCTL; in bkp_rtc_clock_output_select()
170 ctl &= (uint16_t)~BKP_OCTL_CCOSEL; in bkp_rtc_clock_output_select()
171 ctl |= clocksel; in bkp_rtc_clock_output_select()
172 BKP_OCTL = ctl; in bkp_rtc_clock_output_select()
[all …]
Dgd32f403_usart.c215 uint32_t ctl = 0U; in usart_transmit_config() local
217 ctl = USART_CTL0(usart_periph); in usart_transmit_config()
218 ctl &= ~USART_CTL0_TEN; in usart_transmit_config()
219 ctl |= txconfig; in usart_transmit_config()
221 USART_CTL0(usart_periph) = ctl; in usart_transmit_config()
236 uint32_t ctl = 0U; in usart_receive_config() local
238 ctl = USART_CTL0(usart_periph); in usart_receive_config()
239 ctl &= ~USART_CTL0_REN; in usart_receive_config()
240 ctl |= rxconfig; in usart_receive_config()
242 USART_CTL0(usart_periph) = ctl; in usart_receive_config()
[all …]
Dgd32f403_dma.c117 uint32_t ctl; in dma_init() local
133 ctl = DMA_CHCTL(dma_periph, channelx); in dma_init()
134 ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO); in dma_init()
135 ctl |= (init_struct->periph_width | init_struct->memory_width | init_struct->priority); in dma_init()
136 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_init()
371 uint32_t ctl; in dma_priority_config() local
378 ctl = DMA_CHCTL(dma_periph, channelx); in dma_priority_config()
380 ctl &= ~DMA_CHXCTL_PRIO; in dma_priority_config()
381 ctl |= priority; in dma_priority_config()
382 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_priority_config()
[all …]
Dgd32f403_dac.c433 uint32_t ctl = 0U; in dac_concurrent_enable() local
434 ctl = DAC_CTL_DEN0 | DAC_CTL_DEN1; in dac_concurrent_enable()
435 DAC_CTL |= (ctl); in dac_concurrent_enable()
446 uint32_t ctl = 0U; in dac_concurrent_disable() local
447 ctl = DAC_CTL_DEN0 | DAC_CTL_DEN1; in dac_concurrent_disable()
448 DAC_CTL &= (~ctl); in dac_concurrent_disable()
485 uint32_t ctl = 0U; in dac_concurrent_output_buffer_enable() local
486 ctl = DAC_CTL_DBOFF0 | DAC_CTL_DBOFF1; in dac_concurrent_output_buffer_enable()
487 DAC_CTL &= (~ctl); in dac_concurrent_output_buffer_enable()
498 uint32_t ctl = 0U; in dac_concurrent_output_buffer_disable() local
[all …]
/hal_gigadevice-latest/gd32f3x0/standard_peripheral/source/
Dgd32f3x0_i2c.c173 uint32_t ctl = 0U; in i2c_mode_addr_config() local
175 ctl = I2C_CTL0(i2c_periph); in i2c_mode_addr_config()
176 ctl &= ~(I2C_CTL0_SMBEN); in i2c_mode_addr_config()
177 ctl |= mode; in i2c_mode_addr_config()
178 I2C_CTL0(i2c_periph) = ctl; in i2c_mode_addr_config()
371 uint32_t ctl = 0U; in i2c_dma_enable() local
373 ctl = I2C_CTL1(i2c_periph); in i2c_dma_enable()
374 ctl &= ~(I2C_CTL1_DMAON); in i2c_dma_enable()
375 ctl |= dmastate; in i2c_dma_enable()
376 I2C_CTL1(i2c_periph) = ctl; in i2c_dma_enable()
[all …]
Dgd32f3x0_dma.c99 uint32_t ctl; in dma_init() local
113 ctl = DMA_CHCTL(channelx); in dma_init()
114 ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO); in dma_init()
115 ctl |= (init_struct->periph_width | init_struct->memory_width | init_struct->priority); in dma_init()
116 DMA_CHCTL(channelx) = ctl; in dma_init()
289 uint32_t ctl; in dma_priority_config() local
292 ctl = DMA_CHCTL(channelx); in dma_priority_config()
294 ctl &= ~DMA_CHXCTL_PRIO; in dma_priority_config()
295 ctl |= priority; in dma_priority_config()
296 DMA_CHCTL(channelx) = ctl; in dma_priority_config()
[all …]
/hal_gigadevice-latest/gd32e50x/standard_peripheral/source/
Dgd32e50x_bkp.c152 uint16_t ctl = 0U; in bkp_rtc_output_select() local
154 ctl = BKP_OCTL; in bkp_rtc_output_select()
155 ctl &= (uint16_t)~BKP_OCTL_ROSEL; in bkp_rtc_output_select()
156 ctl |= outputsel; in bkp_rtc_output_select()
157 BKP_OCTL = ctl; in bkp_rtc_output_select()
171 uint16_t ctl = 0U; in bkp_rtc_clock_output_select() local
173 ctl = BKP_OCTL; in bkp_rtc_clock_output_select()
174 ctl &= (uint16_t)~BKP_OCTL_CCOSEL; in bkp_rtc_clock_output_select()
175 ctl |= clocksel; in bkp_rtc_clock_output_select()
176 BKP_OCTL = ctl; in bkp_rtc_clock_output_select()
[all …]
Dgd32e50x_usart.c278 uint32_t ctl = 0U; in usart_transmit_config() local
281 ctl = USART5_CTL0(usart_periph); in usart_transmit_config()
282 ctl &= ~USART5_CTL0_TEN; in usart_transmit_config()
283 ctl |= (USART5_CTL0_TEN & txconfig); in usart_transmit_config()
285 USART5_CTL0(usart_periph) = ctl; in usart_transmit_config()
287 ctl = USART_CTL0(usart_periph); in usart_transmit_config()
288 ctl &= ~USART_CTL0_TEN; in usart_transmit_config()
289 ctl |= (USART_CTL0_TEN & txconfig); in usart_transmit_config()
291 USART_CTL0(usart_periph) = ctl; in usart_transmit_config()
307 uint32_t ctl = 0U; in usart_receive_config() local
[all …]
Dgd32e50x_dma.c117 uint32_t ctl; in dma_init() local
137 ctl = DMA_CHCTL(dma_periph, channelx); in dma_init()
138 ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO); in dma_init()
139 ctl |= (init_struct->periph_width | init_struct->memory_width | init_struct->priority); in dma_init()
140 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_init()
375 uint32_t ctl; in dma_priority_config() local
382 ctl = DMA_CHCTL(dma_periph, channelx); in dma_priority_config()
384 ctl &= ~DMA_CHXCTL_PRIO; in dma_priority_config()
385 ctl |= priority; in dma_priority_config()
386 DMA_CHCTL(dma_periph, channelx) = ctl; in dma_priority_config()
[all …]

12