rearragned some code
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#ifndef _COMMON_H_
|
||||
#define _COMMON_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define Q(x) #x
|
||||
#define QUOTE(x) Q(x)
|
||||
#define SET_BIT(value, bitPosition) ((value) |= (1U << (bitPosition)))
|
||||
@@ -64,6 +66,53 @@
|
||||
// -> 6.90µl / Pulse
|
||||
#define DEFAULT_PUMP_DOSE 7
|
||||
|
||||
typedef enum eSystem_Status
|
||||
{
|
||||
sysStat_Startup,
|
||||
sysStat_Normal,
|
||||
sysStat_Rain,
|
||||
sysStat_Purge,
|
||||
sysStat_Error,
|
||||
sysStat_Shutdown
|
||||
} tSystem_Status;
|
||||
|
||||
// Enum for different sources of speed input
|
||||
typedef enum SpeedSource_e
|
||||
{
|
||||
#ifdef FEATURE_ENABLE_TIMER
|
||||
SOURCE_TIME,
|
||||
#endif
|
||||
SOURCE_IMPULSE,
|
||||
SOURCE_GPS,
|
||||
SOURCE_CAN
|
||||
} SpeedSource_t;
|
||||
|
||||
// String representation of SpeedSource enum
|
||||
extern const char *SpeedSourceString[];
|
||||
extern const size_t SpeedSourceString_Elements;
|
||||
|
||||
// Enum for GPS baud rates
|
||||
typedef enum GPSBaudRate_e
|
||||
{
|
||||
BAUD_9600,
|
||||
BAUD_115200
|
||||
} GPSBaudRate_t;
|
||||
|
||||
// String representation of GPSBaudRate enum
|
||||
extern const char *GPSBaudRateString[];
|
||||
extern const size_t GPSBaudRateString_Elements;
|
||||
|
||||
// Enum for CAN bus sources
|
||||
typedef enum CANSource_e
|
||||
{
|
||||
KTM_890_ADV_R_2021,
|
||||
KTM_1290_SD_R_2023
|
||||
} CANSource_t;
|
||||
|
||||
// String representation of CANSource enum
|
||||
extern const char *CANSourceString[];
|
||||
extern const size_t CANSourceString_Elements;
|
||||
|
||||
#define STARTUP_DELAY 5000
|
||||
#define SHUTDOWN_DELAY_MS 5000
|
||||
|
||||
|
Reference in New Issue
Block a user