i broke it

This commit is contained in:
2024-10-14 02:13:05 +06:00
parent 480a4a1ca5
commit 7d33688e75
12 changed files with 112 additions and 70 deletions

View File

@@ -3,12 +3,14 @@
#include <stdint.h>
#define SYSTICK_ONE_MILLISECOND ((uint32_t)FUNCONF_SYSTEM_CORE_CLOCK / 1000)
#define TIMER_DELAY 1000
#define SYSTICK_ONE_MILLISECOND \
(uint32_t)(FUNCONF_SYSTEM_CORE_CLOCK / TIMER_DELAY)
#define millis() (systick_millis)
void systick_init(void);
void init_systick(void);
// ms counter incremented by SysTick
extern volatile uint32_t systick_millis;
// extern volatile uint32_t systick_millis;
#endif // SYSTICK_H

9
include/timer.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef TIMER_H
#define TIMER_H
#include "ch32v003fun.h"
// Function prototypes
void tim2_init(void);
#endif // TIMER_H

View File

@@ -24,6 +24,8 @@ void handle_ip_assigned(void);
// Initializes the W5500 chip
void configure_network(void);
void configure_dhcp(void);
// resolves a domain name
void resolve_domain_name(const char* domain_name);