From 4804e4998167e2b584a7dc82d98a32cfd8e7cd83 Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 27 Sep 2020 12:00:36 +0300 Subject: [PATCH] Fix inclusion from assembly files --- include/protocol.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/protocol.h b/include/protocol.h index 01b84e9..784714e 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -1,6 +1,5 @@ // TODO: cbindgen doesn't work lmao #pragma once -#include #define YB_CMDLINE_SIZE 256 #define YB_KERNEL_MAGIC_V1 {0x07, 0xB0, 0x07, 0xB0, 0xA9, 0x97, 0xA1, 0x00} @@ -10,18 +9,19 @@ #define YB_FLAG_INITRD (1 << 1) #define YB_FLAG_UPPER (1 << 2) +#define YB_LFB_BGR32 0 +#define YB_LFB_RGB32 1 +#define YB_LFB_ANY 2 +#define YB_TEXT 3 + +#if !defined(__ASM__) +#include + struct yb_header { uint8_t kernel_magic[8]; uint8_t loader_magic[8]; }; -enum yb_pixel_format { - YB_LFB_BGR32 = 0, - YB_LFB_RGB32, - YB_LFB_ANY, - YB_TEXT -}; - struct yb_video_info { uint32_t width, height; uint32_t format; @@ -52,3 +52,4 @@ struct yb_proto_v1 { char cmdline[YB_CMDLINE_SIZE]; }; +#endif