Files
Linux-microcontroller-GPIO/CH32V003/ch32v003_GPIO_USB.c
T
2026-10-30 10:37:42 +01:00

29 lines
581 B
C

/* SPDX-License-Identifier: MIT */
/*
* Minimal ch32fun application template for the CH32V003.
*
* Blinks an LED on PD0. Replace the body of main() with your application.
* ch32fun provides SystemInit(), the GPIO helpers, delays, printf and the
* interrupt/startup code; no WCH EVT or WCH toolchain is involved.
*/
#include "ch32fun.h"
#define LED_PIN PD0
int main(void)
{
SystemInit();
funGpioInitAll();
funPinMode(LED_PIN, FUN_OUTPUT);
while (1) {
funDigitalWrite(LED_PIN, FUN_HIGH);
Delay_Ms(250);
funDigitalWrite(LED_PIN, FUN_LOW);
Delay_Ms(250);
}
}