Files
Espresso/include/kernel/kconfig.h

52 lines
781 B
C

#ifndef _KCONFIG_H
#define _KCONFIG_H
#include <types.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ENABLE_DEBUGGING_MESSAGES
//#define ENABLE_FILESYSTEMS
#define ENABLE_IDE
//#define ENABLE_USB
//#define ENABLE_NETWORK
typedef struct {
bool enable_debug;
bool enable_fs;
bool enable_ide;
bool enable_usb;
bool enable_networking;
} kconf_t;
static inline kconf_t get_kconfig(void)
{
kconf_t kc = { false, false, false, false, false };
#ifdef ENABLE_DEBUGGING_MESSAGES
kc.enable_debug = true;
#endif
#ifdef ENABLE_FILESYSTEMS
kc.enable_fs = true;
#endif
#ifdef ENABLE_IDE
kc.enable_ide = true;
#endif
#ifdef ENABLE_USB
kc.enable_usb = true;
#endif
#ifdef ENABLE_NETWORK
kc.enable_networking = true;
#endif
return kc;
}
#ifdef __cplusplus
}
#endif
#endif