wip(ex04)
This commit is contained in:
parent
a87568e5f7
commit
5a954c3713
12 changed files with 403 additions and 57 deletions
15
ex04/include/mystd.h
Normal file
15
ex04/include/mystd.h
Normal 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
ex04/include/timer.h
Normal file
8
ex04/include/timer.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef TIMER_H
|
||||
#define TIMER_H
|
||||
|
||||
#include "mystd.h"
|
||||
|
||||
void timer1_init(void);
|
||||
|
||||
#endif /* TIMER_H */
|
||||
14
ex04/include/uart.h
Normal file
14
ex04/include/uart.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef UART_H
|
||||
#define UART_H
|
||||
|
||||
#include "mystd.h"
|
||||
|
||||
void uart_init(void);
|
||||
|
||||
void uart_tx(char data);
|
||||
void uart_sendstring(const char* str);
|
||||
void uart_send_u8(uint8_t val);
|
||||
|
||||
char uart_rx(void);
|
||||
|
||||
#endif /* UART_H */
|
||||
11
ex04/include/utils.h
Normal file
11
ex04/include/utils.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
#include "mystd.h"
|
||||
#include "utils.h"
|
||||
|
||||
void delay_ms(uint16_t count);
|
||||
|
||||
void ft_bzero(void *data, uint16_t size);
|
||||
|
||||
#endif /* UTILS_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue