feat(ex03): it works hehe

This commit is contained in:
Maix0 2026-04-15 16:02:30 +02:00
parent d70042cf93
commit a87568e5f7
11 changed files with 291 additions and 0 deletions

15
ex03/include/mystd.h Normal file
View file

@ -0,0 +1,15 @@
#ifndef MYSTDINT_H
#define MYSTDINT_H
typedef unsigned int uint16_t;
typedef signed int int16_t;
typedef unsigned char uint8_t;
typedef signed char int8_t;
typedef uint8_t bool;
#define true (1)
#define false (0)
#endif /* MYSTDINT_H */

8
ex03/include/timer.h Normal file
View file

@ -0,0 +1,8 @@
#ifndef TIMER_H
#define TIMER_H
#include "mystd.h"
void timer1_init(void);
#endif /* TIMER_H */

13
ex03/include/uart.h Normal file
View file

@ -0,0 +1,13 @@
#ifndef UART_H
#define UART_H
#include "mystd.h"
void uart_init(void);
void uart_tx(char data);
void uart_sendstring(const char* str);
char uart_rx(void);
#endif /* UART_H */

8
ex03/include/utils.h Normal file
View file

@ -0,0 +1,8 @@
#ifndef UTILS_H
#define UTILS_H
#include "mystd.h"
void delay_ms(uint16_t count);
#endif /* UTILS_H */