Skip to content

Commit 12980f4

Browse files
author
Cruz Monrreal
authored
Merge pull request #9232 from ChazJin/gd32f450
Add GD32_F450ZI as new target
2 parents d20b591 + 970bc24 commit 12980f4

File tree

100 files changed

+44840
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+44840
-1
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#include "gd32f4xx.h"
20+
21+
/**
22+
* Initializes the HW pin for enet
23+
*
24+
*/
25+
void enet_bsp_init(void)
26+
{
27+
/* enable GPIOs clocks */
28+
rcu_periph_clock_enable(RCU_GPIOA);
29+
rcu_periph_clock_enable(RCU_GPIOB);
30+
rcu_periph_clock_enable(RCU_GPIOC);
31+
32+
/* enable SYSCFG clock */
33+
rcu_periph_clock_enable(RCU_SYSCFG);
34+
syscfg_enet_phy_interface_config(SYSCFG_ENET_PHY_RMII);
35+
/** ETH GPIO Configuration
36+
RMII_REF_CLK ----------------------> PA1
37+
RMII_MDIO -------------------------> PA2
38+
RMII_MDC --------------------------> PC1
39+
RMII_MII_CRS_DV -------------------> PA7
40+
RMII_MII_RXD0 ---------------------> PC4
41+
RMII_MII_RXD1 ---------------------> PC5
42+
RMII_MII_TX_EN --------------------> PB11
43+
RMII_MII_TXD0 ---------------------> PB12
44+
RMII_MII_TXD1 ---------------------> PB13
45+
*/
46+
47+
/* PA1: ETH_RMII_REF_CLK */
48+
gpio_mode_set(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_1);
49+
gpio_output_options_set(GPIOA, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_1);
50+
51+
/* PA2: ETH_MDIO */
52+
gpio_mode_set(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_2);
53+
gpio_output_options_set(GPIOA, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_2);
54+
55+
/* PA7: ETH_RMII_CRS_DV */
56+
gpio_mode_set(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_7);
57+
gpio_output_options_set(GPIOA, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_7);
58+
59+
gpio_af_set(GPIOA, GPIO_AF_11, GPIO_PIN_1);
60+
gpio_af_set(GPIOA, GPIO_AF_11, GPIO_PIN_2);
61+
gpio_af_set(GPIOA, GPIO_AF_11, GPIO_PIN_7);
62+
63+
/* PB11: ETH_RMII_TX_EN */
64+
gpio_mode_set(GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_11);
65+
gpio_output_options_set(GPIOB, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_11);
66+
67+
/* PB12: ETH_RMII_TXD0 */
68+
gpio_mode_set(GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_12);
69+
gpio_output_options_set(GPIOB, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_12);
70+
71+
/* PB13: ETH_RMII_TXD1 */
72+
gpio_mode_set(GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_13);
73+
gpio_output_options_set(GPIOB, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_13);
74+
75+
gpio_af_set(GPIOB, GPIO_AF_11, GPIO_PIN_11);
76+
gpio_af_set(GPIOB, GPIO_AF_11, GPIO_PIN_12);
77+
gpio_af_set(GPIOB, GPIO_AF_11, GPIO_PIN_13);
78+
79+
/* PC1: ETH_MDC */
80+
gpio_mode_set(GPIOC, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_1);
81+
gpio_output_options_set(GPIOC, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_1);
82+
83+
/* PC4: ETH_RMII_RXD0 */
84+
gpio_mode_set(GPIOC, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_4);
85+
gpio_output_options_set(GPIOC, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_4);
86+
87+
/* PC5: ETH_RMII_RXD1 */
88+
gpio_mode_set(GPIOC, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO_PIN_5);
89+
gpio_output_options_set(GPIOC, GPIO_OTYPE_PP, GPIO_OSPEED_200MHZ, GPIO_PIN_5);
90+
91+
gpio_af_set(GPIOC, GPIO_AF_11, GPIO_PIN_1);
92+
gpio_af_set(GPIOC, GPIO_AF_11, GPIO_PIN_4);
93+
gpio_af_set(GPIOC, GPIO_AF_11, GPIO_PIN_5);
94+
95+
/* enable the ETHERNET global interrupt */
96+
nvic_irq_enable(ENET_IRQn, 0x7, 0);
97+
98+
/* enable ETHERNET clock */
99+
rcu_periph_clock_enable(RCU_ENET);
100+
rcu_periph_clock_enable(RCU_ENETTX);
101+
rcu_periph_clock_enable(RCU_ENETRX);
102+
}

targets/TARGET_GigaDevice/TARGET_GD32F4XX/GD32F4xx_standard_peripheral/Include/gd32f4xx_adc.h

Lines changed: 517 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_GigaDevice/TARGET_GD32F4XX/GD32F4xx_standard_peripheral/Include/gd32f4xx_can.h

Lines changed: 722 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*!
2+
\file gd32f4xx_crc.h
3+
\brief definitions for the CRC
4+
5+
\version 2016-08-15, V1.0.0, firmware for GD32F4xx
6+
\version 2018-12-12, V2.0.0, firmware for GD32F4xx
7+
\version 2018-12-25, V2.1.0, firmware for GD32F4xx (The version is for mbed)
8+
*/
9+
10+
/*
11+
Copyright (c) 2018, GigaDevice Semiconductor Inc.
12+
13+
All rights reserved.
14+
15+
Redistribution and use in source and binary forms, with or without modification,
16+
are permitted provided that the following conditions are met:
17+
18+
1. Redistributions of source code must retain the above copyright notice, this
19+
list of conditions and the following disclaimer.
20+
2. Redistributions in binary form must reproduce the above copyright notice,
21+
this list of conditions and the following disclaimer in the documentation
22+
and/or other materials provided with the distribution.
23+
3. Neither the name of the copyright holder nor the names of its contributors
24+
may be used to endorse or promote products derived from this software without
25+
specific prior written permission.
26+
27+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
31+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
36+
OF SUCH DAMAGE.
37+
*/
38+
39+
#ifndef GD32F4XX_CRC_H
40+
#define GD32F4XX_CRC_H
41+
42+
#include "gd32f4xx.h"
43+
44+
/* CRC definitions */
45+
#define CRC CRC_BASE
46+
47+
/* registers definitions */
48+
#define CRC_DATA REG32(CRC + 0x00U) /*!< CRC data register */
49+
#define CRC_FDATA REG32(CRC + 0x04U) /*!< CRC free data register */
50+
#define CRC_CTL REG32(CRC + 0x08U) /*!< CRC control register */
51+
52+
/* bits definitions */
53+
/* CRC_DATA */
54+
#define CRC_DATA_DATA BITS(0,31) /*!< CRC calculation result bits */
55+
56+
/* CRC_FDATA */
57+
#define CRC_FDATA_FDATA BITS(0,7) /*!< CRC free data bits */
58+
59+
/* CRC_CTL */
60+
#define CRC_CTL_RST BIT(0) /*!< CRC reset CRC_DATA register bit */
61+
62+
63+
/* function declarations */
64+
/* deinit CRC calculation unit */
65+
void crc_deinit(void);
66+
67+
/* reset data register(CRC_DATA) to the value of 0xFFFFFFFF */
68+
void crc_data_register_reset(void);
69+
/* read the value of the data register */
70+
uint32_t crc_data_register_read(void);
71+
72+
/* read the value of the free data register */
73+
uint8_t crc_free_data_register_read(void);
74+
/* write data to the free data register */
75+
void crc_free_data_register_write(uint8_t free_data);
76+
77+
/* calculate the CRC value of a 32-bit data */
78+
uint32_t crc_single_data_calculate(uint32_t sdata);
79+
/* calculate the CRC value of an array of 32-bit values */
80+
uint32_t crc_block_data_calculate(uint32_t array[], uint32_t size);
81+
82+
#endif /* GD32F4XX_CRC_H */
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
/*!
2+
\file gd32f4xx_ctc.h
3+
\brief definitions for the CTC
4+
5+
\version 2016-08-15, V1.0.0, firmware for GD32F4xx
6+
\version 2018-12-12, V2.0.0, firmware for GD32F4xx
7+
\version 2018-12-25, V2.1.0, firmware for GD32F4xx (The version is for mbed)
8+
*/
9+
10+
/*
11+
Copyright (c) 2018, GigaDevice Semiconductor Inc.
12+
13+
All rights reserved.
14+
15+
Redistribution and use in source and binary forms, with or without modification,
16+
are permitted provided that the following conditions are met:
17+
18+
1. Redistributions of source code must retain the above copyright notice, this
19+
list of conditions and the following disclaimer.
20+
2. Redistributions in binary form must reproduce the above copyright notice,
21+
this list of conditions and the following disclaimer in the documentation
22+
and/or other materials provided with the distribution.
23+
3. Neither the name of the copyright holder nor the names of its contributors
24+
may be used to endorse or promote products derived from this software without
25+
specific prior written permission.
26+
27+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
31+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
36+
OF SUCH DAMAGE.
37+
*/
38+
39+
#ifndef GD32F4XX_CTC_H
40+
#define GD32F4XX_CTC_H
41+
42+
#include "gd32f4xx.h"
43+
44+
/* CTC definitions */
45+
#define CTC CTC_BASE
46+
47+
/* registers definitions */
48+
#define CTC_CTL0 REG32((CTC) + 0x00U) /*!< CTC control register 0 */
49+
#define CTC_CTL1 REG32((CTC) + 0x04U) /*!< CTC control register 1 */
50+
#define CTC_STAT REG32((CTC) + 0x08U) /*!< CTC status register */
51+
#define CTC_INTC REG32((CTC) + 0x0CU) /*!< CTC interrupt clear register */
52+
53+
/* bits definitions */
54+
/* CTC_CTL0 */
55+
#define CTC_CTL0_CKOKIE BIT(0) /*!< clock trim OK(CKOKIF) interrupt enable */
56+
#define CTC_CTL0_CKWARNIE BIT(1) /*!< clock trim warning(CKWARNIF) interrupt enable */
57+
#define CTC_CTL0_ERRIE BIT(2) /*!< error(ERRIF) interrupt enable */
58+
#define CTC_CTL0_EREFIE BIT(3) /*!< EREFIF interrupt enable */
59+
#define CTC_CTL0_CNTEN BIT(5) /*!< CTC counter enable */
60+
#define CTC_CTL0_AUTOTRIM BIT(6) /*!< hardware automatically trim mode */
61+
#define CTC_CTL0_SWREFPUL BIT(7) /*!< software reference source sync pulse */
62+
#define CTC_CTL0_TRIMVALUE BITS(8,13) /*!< IRC48M trim value */
63+
64+
/* CTC_CTL1 */
65+
#define CTC_CTL1_RLVALUE BITS(0,15) /*!< CTC counter reload value */
66+
#define CTC_CTL1_CKLIM BITS(16,23) /*!< clock trim base limit value */
67+
#define CTC_CTL1_REFPSC BITS(24,26) /*!< reference signal source prescaler */
68+
#define CTC_CTL1_REFSEL BITS(28,29) /*!< reference signal source selection */
69+
#define CTC_CTL1_USBSOFSEL BIT(30) /*!< USBFS or USBHS SOF signal selection */
70+
#define CTC_CTL1_REFPOL BIT(31) /*!< reference signal source polarity */
71+
72+
/* CTC_STAT */
73+
#define CTC_STAT_CKOKIF BIT(0) /*!< clock trim OK interrupt flag */
74+
#define CTC_STAT_CKWARNIF BIT(1) /*!< clock trim warning interrupt flag */
75+
#define CTC_STAT_ERRIF BIT(2) /*!< error interrupt flag */
76+
#define CTC_STAT_EREFIF BIT(3) /*!< expect reference interrupt flag */
77+
#define CTC_STAT_CKERR BIT(8) /*!< clock trim error bit */
78+
#define CTC_STAT_REFMISS BIT(9) /*!< reference sync pulse miss */
79+
#define CTC_STAT_TRIMERR BIT(10) /*!< trim value error bit */
80+
#define CTC_STAT_REFDIR BIT(15) /*!< CTC trim counter direction when reference sync pulse occurred */
81+
#define CTC_STAT_REFCAP BITS(16,31) /*!< CTC counter capture when reference sync pulse occurred */
82+
83+
/* CTC_INTC */
84+
#define CTC_INTC_CKOKIC BIT(0) /*!< CKOKIF interrupt clear bit */
85+
#define CTC_INTC_CKWARNIC BIT(1) /*!< CKWARNIF interrupt clear bit */
86+
#define CTC_INTC_ERRIC BIT(2) /*!< ERRIF interrupt clear bit */
87+
#define CTC_INTC_EREFIC BIT(3) /*!< EREFIF interrupt clear bit */
88+
89+
/* constants definitions */
90+
/* hardware automatically trim mode definitions */
91+
#define CTC_HARDWARE_TRIM_MODE_ENABLE CTC_CTL0_AUTOTRIM /*!< hardware automatically trim mode enable*/
92+
#define CTC_HARDWARE_TRIM_MODE_DISABLE ((uint32_t)0x00000000U) /*!< hardware automatically trim mode disable*/
93+
94+
/* reference signal source polarity definitions */
95+
#define CTC_REFSOURCE_POLARITY_FALLING CTC_CTL1_REFPOL /*!< reference signal source polarity is falling edge*/
96+
#define CTC_REFSOURCE_POLARITY_RISING ((uint32_t)0x00000000U) /*!< reference signal source polarity is rising edge*/
97+
98+
/* USBFS or USBHS SOF signal selection definitions */
99+
#define CTC_USBSOFSEL_USBHS CTC_CTL1_USBSOFSEL /*!< USBHS SOF signal is selected*/
100+
#define CTC_USBSOFSEL_USBFS ((uint32_t)0x00000000U) /*!< USBFS SOF signal is selected*/
101+
102+
/* reference signal source selection definitions */
103+
#define CTL1_REFSEL(regval) (BITS(28,29) & ((uint32_t)(regval) << 28))
104+
#define CTC_REFSOURCE_GPIO CTL1_REFSEL(0) /*!< GPIO is selected */
105+
#define CTC_REFSOURCE_LXTAL CTL1_REFSEL(1) /*!< LXTAL is clock selected */
106+
#define CTC_REFSOURCE_USBSOF CTL1_REFSEL(2) /*!< USBSOF is selected */
107+
108+
/* reference signal source prescaler definitions */
109+
#define CTL1_REFPSC(regval) (BITS(24,26) & ((uint32_t)(regval) << 24))
110+
#define CTC_REFSOURCE_PSC_OFF CTL1_REFPSC(0) /*!< reference signal not divided */
111+
#define CTC_REFSOURCE_PSC_DIV2 CTL1_REFPSC(1) /*!< reference signal divided by 2 */
112+
#define CTC_REFSOURCE_PSC_DIV4 CTL1_REFPSC(2) /*!< reference signal divided by 4 */
113+
#define CTC_REFSOURCE_PSC_DIV8 CTL1_REFPSC(3) /*!< reference signal divided by 8 */
114+
#define CTC_REFSOURCE_PSC_DIV16 CTL1_REFPSC(4) /*!< reference signal divided by 16 */
115+
#define CTC_REFSOURCE_PSC_DIV32 CTL1_REFPSC(5) /*!< reference signal divided by 32 */
116+
#define CTC_REFSOURCE_PSC_DIV64 CTL1_REFPSC(6) /*!< reference signal divided by 64 */
117+
#define CTC_REFSOURCE_PSC_DIV128 CTL1_REFPSC(7) /*!< reference signal divided by 128 */
118+
119+
/* CTC interrupt enable definitions */
120+
#define CTC_INT_CKOK CTC_CTL0_CKOKIE /*!< clock trim OK interrupt enable */
121+
#define CTC_INT_CKWARN CTC_CTL0_CKWARNIE /*!< clock trim warning interrupt enable */
122+
#define CTC_INT_ERR CTC_CTL0_ERRIE /*!< error interrupt enable */
123+
#define CTC_INT_EREF CTC_CTL0_EREFIE /*!< expect reference interrupt enable */
124+
125+
/* CTC interrupt source definitions */
126+
#define CTC_INT_FLAG_CKOK CTC_STAT_CKOKIF /*!< clock trim OK interrupt flag */
127+
#define CTC_INT_FLAG_CKWARN CTC_STAT_CKWARNIF /*!< clock trim warning interrupt flag */
128+
#define CTC_INT_FLAG_ERR CTC_STAT_ERRIF /*!< error interrupt flag */
129+
#define CTC_INT_FLAG_EREF CTC_STAT_EREFIF /*!< expect reference interrupt flag */
130+
#define CTC_INT_FLAG_CKERR CTC_STAT_CKERR /*!< clock trim error bit */
131+
#define CTC_INT_FLAG_REFMISS CTC_STAT_REFMISS /*!< reference sync pulse miss */
132+
#define CTC_INT_FLAG_TRIMERR CTC_STAT_TRIMERR /*!< trim value error */
133+
134+
/* CTC flag definitions */
135+
#define CTC_FLAG_CKOK CTC_STAT_CKOKIF /*!< clock trim OK flag */
136+
#define CTC_FLAG_CKWARN CTC_STAT_CKWARNIF /*!< clock trim warning flag */
137+
#define CTC_FLAG_ERR CTC_STAT_ERRIF /*!< error flag */
138+
#define CTC_FLAG_EREF CTC_STAT_EREFIF /*!< expect reference flag */
139+
#define CTC_FLAG_CKERR CTC_STAT_CKERR /*!< clock trim error bit */
140+
#define CTC_FLAG_REFMISS CTC_STAT_REFMISS /*!< reference sync pulse miss */
141+
#define CTC_FLAG_TRIMERR CTC_STAT_TRIMERR /*!< trim value error bit */
142+
143+
/* function declarations */
144+
/* reset ctc clock trim controller */
145+
void ctc_deinit(void);
146+
/* enable CTC trim counter */
147+
void ctc_counter_enable(void);
148+
/* disable CTC trim counter */
149+
void ctc_counter_disable(void);
150+
151+
/* configure the IRC48M trim value */
152+
void ctc_irc48m_trim_value_config(uint8_t trim_value);
153+
/* generate software reference source sync pulse */
154+
void ctc_software_refsource_pulse_generate(void);
155+
/* configure hardware automatically trim mode */
156+
void ctc_hardware_trim_mode_config(uint32_t hardmode);
157+
158+
/* configure reference signal source polarity */
159+
void ctc_refsource_polarity_config(uint32_t polarity);
160+
/* select USBFS or USBHS SOF signal */
161+
void ctc_usbsof_signal_select(uint32_t usbsof);
162+
/* select reference signal source */
163+
void ctc_refsource_signal_select(uint32_t refs);
164+
/* configure reference signal source prescaler */
165+
void ctc_refsource_prescaler_config(uint32_t prescaler);
166+
/* configure clock trim base limit value */
167+
void ctc_clock_limit_value_config(uint8_t limit_value);
168+
/* configure CTC counter reload value */
169+
void ctc_counter_reload_value_config(uint16_t reload_value);
170+
171+
/* read CTC counter capture value when reference sync pulse occurred */
172+
uint16_t ctc_counter_capture_value_read(void);
173+
/* read CTC trim counter direction when reference sync pulse occurred */
174+
FlagStatus ctc_counter_direction_read(void);
175+
/* read CTC counter reload value */
176+
uint16_t ctc_counter_reload_value_read(void);
177+
/* read the IRC48M trim value */
178+
uint8_t ctc_irc48m_trim_value_read(void);
179+
180+
/* interrupt & flag functions */
181+
/* enable the CTC interrupt */
182+
void ctc_interrupt_enable(uint32_t interrupt);
183+
/* disable the CTC interrupt */
184+
void ctc_interrupt_disable(uint32_t interrupt);
185+
/* get CTC interrupt flag */
186+
FlagStatus ctc_interrupt_flag_get(uint32_t int_flag);
187+
/* clear CTC interrupt flag */
188+
void ctc_interrupt_flag_clear(uint32_t int_flag);
189+
/* get CTC flag */
190+
FlagStatus ctc_flag_get(uint32_t flag);
191+
/* clear CTC flag */
192+
void ctc_flag_clear(uint32_t flag);
193+
194+
#endif /* GD32F4XX_CTC_H */

0 commit comments

Comments
 (0)