#ifndef CANDIS_CAMPO_CONFIG_H
#define CANDIS_CAMPO_CONFIG_H
//----------------------------------------------------------------------------
///
/// \brief  Config for mainswitch
///
///         -
//
/// \date   20240909
/// \author Maximilian Seesslen <mes@seesslen.net>
///
//----------------------------------------------------------------------------


#define CONFIG_LAYOUT_MAJOR                     3
#define CONFIG_LAYOUT_MINOR                     0

// #define LEPTO_LOG_DEBUG                         1
#define CONFIG_BIWAK_SUPPORT_VOLATILE_RING      1
// one of the MCP7940 is dodgy
#define CONFIG_BIWAK_USE_I2C_RETRIES            1
#define CONFIG_BIWAK_USE_FREEZE_HANDLER         1
#define CONFIG_BIWAK_LOG_USE_TIMESTAMPS         1
#define CONFIG_BIWAK_SUPPORT_VOLATILE_RING      1
#define CONFIG_BIWAK_LOG                        1
#define CONFIG_BIWAK_LOG_HEARTBEAT              1
#define CONFIG_BIWAK_DATA_EVENT                 1
#define CONFIG_BIWAK_RESETCOUNTER               1

#define CONFIG_LEPTO_LOG_USE_PRETTY_PRINT       1
#define CONFIG_LEPTO_LOG_USE_ANSI               1


//--- Vagus ------------------------------------------------------------------


#define CONFIG_VAGUS_HWINFO_V5                  1
#define CONFIG_VAGUS_BOOTLOADER_EEPROM_CONFIG   1
#define CONFIG_VAGUS_INSTANCIATE_EEPROM         1
// Serno 2 is 16Bit; Serrno 3 is 16Bit; Serrno 5 is 8 Bit
#define CONFIG_VAGUS_EEPROM_WIDTH_DETECT        1
// #define CONFIG_VAGUS_EEPROM_WIDTH_16BIT          1
// #define CONFIG_VAGUS_EEPROM_WIDTH_8BIT          1
#define CONFIG_VAGUS_CAN_PLACEHOLDER            1
#define CONFIG_VAGUS_LOG_HEARTBEAT              1

// CAN is optional. Also messages are send to monitor screens
#define CONFIG_VAGUS_CAN_EVENTLOOP              0

#define CONFIG_VAGUS_SEND_CONFIG                1
#define CONFIG_VAGUS_CUSTOM_SEND_CONFIG         1
#define CONFIG_VAGUS_USE_HEARTBEAT              1
#define CONFIG_VAGUS_USE_UID                    1
// #define VAGUSE_SMALL_INTRODUCTION         0
#define CONFIG_VAGUS_USE_CAN                    1
#define CONFIG_VAGUS_CUSTOM_DIGEST_WRITE_OBJECT 1
#define CONFIG_VAGUS_CUSTOM_DIGEST_SEND_OBJECT  1
#define CONFIG_VAGUS_HANDLE_EEPROM              1
#define CONFIG_VAGUS_USE_BOOTCOUNTER            1
#define CONFIG_VAGUS_USE_OPERATINGTIME          1
#define CONFIG_VAGUS_HANDLE_STATUS              1
#define CONFIG_VAGUS_USE_BRINGUP                1
#define CONFIG_VAGUS_RTC                        1

#if ! defined STM32
   #define CONFIG_BIWAK_LOG_CUSTOM_CHANNEL      1
   #define CONFIG_VAGUS_CAN_STATUS              1
#endif

#define VAGUS_CONFIGURED
#define LEPTO_CONFIGURED
#define BIWAK_CONFIGURED

#if defined VAGUS_EXTENSION_BOOTLOADER
   #undef CONFIG_BIWAK_LOG_CODE
   
   #define CONFIG_VAGUS_IS_BOOTLOADER              1
   #define CONFIG_VAGUS_TDT_MMP                    1
   // #undef CONFIG_VAGUS_CUSTOM_DIGEST_WRITE_OBJECT
   #undef CONFIG_VAGUS_CUSTOM_DIGEST_SEND_OBJECT
   #undef CONFIG_VAGUS_USE_BRINGUP
   #undef CONFIG_VAGUS_USE_OPERATINGTIME
   #undef CONFIG_VAGUS_SEND_CONFIG
   #undef CONFIG_VAGUS_USE_UID
   #define CONFIG_VAGUS_USE_UID
   //#undef CONFIG_BIWAK_DATA_EVENT

   #undef CONFIG_VAGUS_CAN_EVENTLOOP
   #define CONFIG_VAGUS_CAN_EVENTLOOP              1
   #define CONFIG_KOKON_WRITE_EEPROM               1
   #define CONFIG_KOKON_SEND_EEPROM                1

#else
   #define CONFIG_VAGUS_HAS_BOOTLOADER             1
#endif


#endif // ? ! CANDIS_CAMPO_CONFIG_H
