From 5bd4c9ab10f799163321e296061f534c78845e40 Mon Sep 17 00:00:00 2001 From: Passthem <514827965@qq.com> Date: Mon, 14 Apr 2025 16:24:32 +0800 Subject: [PATCH] e2 --- .vscode/settings.json | 3 ++- include/color_utils.h | 1 - include/spi_utils.h | 3 +-- src/color_utils.c | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 42bb310..9bc3ba5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,8 @@ "app.h": "c", "time.h": "c", "math.h": "c", - "color_utils.h": "c" + "color_utils.h": "c", + "stdint.h": "c" }, "C_Cpp.errorSquiggles": "enabled", "C_Cpp.default.includePath": [ diff --git a/include/color_utils.h b/include/color_utils.h index ff92db3..b136452 100644 --- a/include/color_utils.h +++ b/include/color_utils.h @@ -1,7 +1,6 @@ #ifndef COLOR_UTILS_H #define COLOR_UTILS_H -#include #include typedef struct Color { diff --git a/include/spi_utils.h b/include/spi_utils.h index b162a40..0de62bd 100644 --- a/include/spi_utils.h +++ b/include/spi_utils.h @@ -1,8 +1,7 @@ #ifndef SPI_UTILS_H #define SPI_UTILS_H -typedef unsigned char uint8_t; -typedef unsigned int uint32_t; +#include int init_device(const char* device); int send_buffer(int fd, uint8_t* buffer, const int data_size); diff --git a/src/color_utils.c b/src/color_utils.c index f161528..af934a8 100644 --- a/src/color_utils.c +++ b/src/color_utils.c @@ -1,4 +1,5 @@ #include "color_utils.h" +#include #include Color hex_to_color(int hex) {