46 lines
938 B
C
46 lines
938 B
C
#ifndef _COMMON_H_
|
|
#define _COMMON_H_
|
|
|
|
#define Q(x) #x
|
|
#define QUOTE(x) Q(x)
|
|
|
|
#define GPIO_BUTTON D4
|
|
#define GPIO_LED D3
|
|
#define GPIO_TRIGGER D6
|
|
#define GPIO_PUMP D0
|
|
#define GPIO_CS_CAN D8
|
|
|
|
#ifndef HOST_NAME
|
|
#define HOST_NAME "ChainLube_%06X" // Use printf-Formatting - Chip-ID (uin32_t) will be added
|
|
#endif
|
|
|
|
#ifndef OTA_DELAY
|
|
#define OTA_DELAY 50 // ticks -> 10ms / tick
|
|
#endif
|
|
|
|
#ifndef ADMIN_PASSWORD
|
|
#error "You need to define ADMIN_PASSWORD for OTA-Update"
|
|
#endif
|
|
#ifndef WIFI_PASSWORD
|
|
#error "You must define an WIFI_PASSWORD for OTA-Update"
|
|
#endif
|
|
#ifndef WIFI_SSID
|
|
#error "You must define an WIFI_SSID for OTA-Update"
|
|
#endif
|
|
#ifndef WIFI_AP_PASSWORD
|
|
#error "You must define an WIFI_AP_PASSWORD for Standalone AP-Mode"
|
|
#endif
|
|
|
|
#ifndef PCB_REVISION
|
|
#error "You must define PCB_REVISION"
|
|
#else
|
|
|
|
#if PCB_REVISION == 13
|
|
#elif PCB_REVISION == 12
|
|
#elif PCB_REVISION == 10
|
|
#else
|
|
#error "Unknown PCB_REVISION defined"
|
|
#endif
|
|
#endif
|
|
|
|
#endif |