Kettenoeler/Software/include/sanitycheck.h

50 lines
1.3 KiB
C
Raw Normal View History

/**
* @file sanitycheck.h
*
* @brief Header file for sanity checks and configuration validation in the ChainLube application.
*
* This file contains checks and validations to ensure that the configuration and features of the
* ChainLube application are compatible with the selected PCB revision and defined parameters.
*
* @author Marcel Peterkau
* @date 09.01.2024
*/
2022-08-21 11:28:58 +02:00
#ifndef _SANITYCHECK_H_
#define _SANITYCHECK_H_
#ifndef PCB_REV
#error "You must define PCB_REV"
#else
#if PCB_REV < 1 || PCB_REV > 4
#error "Unsupported PCB-Revision"
#endif
2022-08-22 09:23:01 +02:00
2023-03-02 17:38:57 +01:00
#if PCB_REV < 3 && defined(FEATURE_ENABLE_CAN)
2022-08-22 09:23:01 +02:00
#error "CAN-Feature unsupported with this PCB-Rev"
#endif
#if PCB_REV < 4 && defined(DFEATURE_ENABLE_GPS)
2023-03-02 17:38:57 +01:00
#error "GPS-Feature unsupported with this PCB-Rev"
2022-08-22 09:23:01 +02:00
#endif
2022-08-21 11:28:58 +02:00
#endif
#ifndef ADMIN_PASSWORD
#error "You need to define ADMIN_PASSWORD for OTA-Update"
#endif
#ifdef FEATURE_ENABLE_WIFI_CLIENT
#ifndef WIFI_PASSWORD_CLIENT
#error "You must define an WIFI_PASSWORD for Client-Mode"
#endif
#ifndef WIFI_SSID_CLIENT
#error "You must define an WIFI_SSID for Client-Mode"
#endif
#endif
#ifndef WIFI_AP_PASSWORD
#error "You must define an WIFI_AP_PASSWORD for Standalone AP-Mode"
#endif
#endif // _SANITYCHECK_H_