GD32F103ZET6开发板PDF原理图+硬件用户手册+软件Demo源码资料,01_Running_LED
02_SysTick_LED
03_USART1_Print
04_USART2_Print
05_I2C_EEPROM
06_SPI_SPI-Flash
07_RTC_Clock
08_EXMC_NandFlash
09_EXMC_TouchScreen
10_ADC_DMA
11_DAC Output Voltage Value
12_SDIO_SDCardTest
13_I2S_Audio Player
14_USB_Custom_HID
#include "gd32f10x.h"
#include
#include "systick.h"
/* Private function prototypes -----------------------------------------------*/
void LED_config(void);
void Turn_On_LED(uint8_t LED_NUM);
/* Private variables ---------------------------------------------------------*/
uint8_t count=0;
/* Private functions ---------------------------------------------------------*/
/**
* @brief Configure the GPIO ports.
* @param None
* @retval None
*/
void LED_config(void)
{
GPIO_InitPara GPIO_InitStructure;
/* Enable GPIOF clock */
RCC_APB2PeriphClock_Enable(RCC_APB2PERIPH_GPIOF, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_PIN_0 |GPIO_PIN_1 |GPIO_PIN_2 |GPIO_PIN_3;
GPIO_InitStructure.GPIO_Speed = GPIO_SPEED_50MHZ;
GPIO_InitStructure.GPIO_Mode = GPIO_MODE_OUT_PP;
GPIO_Init(GPIOF,&GPIO_InitStructure);
GPIO_ResetBits(GPIOF, GPIO_PIN_0 |GPIO_PIN_1 |GPIO_PIN_2 |GPIO_PIN_3);
}
/**
* @brief Light the LEDs.
* @param LED_NUM:LEDx where x can be 2..5.
* @retval None
*/
void Turn_On_LED(uint8_t LED_NUM)
{
switch(LED_NUM)
{
/* Light the LED2 */
case 0:
GPIO_SetBits(GPIOF,GPIO_PIN_0);
break;
/* Light the LED3 */
case 1:
GPIO_SetBits(GPIOF,GPIO_PIN_1);
break;
/* Light the LED4 */
case 2:
GPIO_SetBits(GPIOF,