uc: include METERCONST and MUXN as config options in Makefile

This commit is contained in:
Bart Van Der Meerssche 2010-01-18 23:24:11 +00:00
parent 2b769d5556
commit b6e98cd734
2 changed files with 29 additions and 26 deletions

View File

@ -86,13 +86,15 @@ F_CPU = 1000000
# make TYPE= xxxx SENSOR0=yyyy ... # make TYPE= xxxx SENSOR0=yyyy ...
# #
TYPE = 2301 TYPE = 2301
METERCONST = 7091
MUXN = 0
# #
SENSOR0 = 0123456789abcdef0123456789abcde0 SENSOR0 = 0123456789abcdef0123456789abcde0
SENSOR1 = 0123456789abcdef0123456789abcde1 SENSOR1 = 0123456789abcdef0123456789abcde1
SENSOR2 = 0123456789abcdef0123456789abcde2 SENSOR2 = 0123456789abcdef0123456789abcde2
SENSOR3 = 0123456789abcdef0123456789abcde3 SENSOR3 = 0123456789abcdef0123456789abcde3
# #
CEXTRA = -D TYPE=$(TYPE) -D 'SENSOR0="$(SENSOR0)"' -D 'SENSOR1="$(SENSOR1)"' -D 'SENSOR2="$(SENSOR2)"' -D 'SENSOR3="$(SENSOR3)"' CEXTRA = -D TYPE=$(TYPE) -D METERCONST=$(METERCONST) -D MUXN=$(MUXN) -D 'SENSOR0="$(SENSOR0)"' -D 'SENSOR1="$(SENSOR1)"' -D 'SENSOR2="$(SENSOR2)"' -D 'SENSOR3="$(SENSOR3)"'
##################################################################################### #####################################################################################
##################################################################################### #####################################################################################

View File

@ -40,36 +40,37 @@
#define TYPE 2301 #define TYPE 2301
#endif #endif
#ifndef METERCONST
#if TYPE == 2201 // 220V - 1-phase @ 488.28Hz sampling rate #if TYPE == 2201 // 220V - 1-phase @ 488.28Hz sampling rate
#define METERCONST 6783 #define METERCONST 6783
#define MUXN 0 #define MUXN 0
#warning "220V - 1-phase selected. METERCONST set to 6783" #warning "220V - 1-phase selected. METERCONST set to 6783"
#elif TYPE == 2203 // 220V - 3-phase @ 488.28Hz sampling rate #elif TYPE == 2203 // 220V - 3-phase @ 488.28Hz sampling rate
#define METERCONST 6721 #define METERCONST 6721
#define MUXN 1 #define MUXN 1
#warning "220V - 3-phase selected. METERCONST set to 6721" #warning "220V - 3-phase selected. METERCONST set to 6721"
#elif TYPE == 2301 // 230V - 1-phase @ 488.28Hz sampling rate #elif TYPE == 2301 // 230V - 1-phase @ 488.28Hz sampling rate
#define METERCONST 7091 #define METERCONST 7091
#define MUXN 0 #define MUXN 0
#warning "230V - 1-phase selected. METERCONST set to 7091" #warning "230V - 1-phase selected. METERCONST set to 7091"
#elif TYPE == 2303 // 230V - 3-phase @ 488.28Hz sampling rate #elif TYPE == 2303 // 230V - 3-phase @ 488.28Hz sampling rate
#define METERCONST 7026 #define METERCONST 7026
#define MUXN 1 #define MUXN 1
#warning "230V - 3-phase selected. METERCONST set to 7026" #warning "230V - 3-phase selected. METERCONST set to 7026"
#elif TYPE == 2401 // 240V - 1-phase @ 488.28Hz sampling rate #elif TYPE == 2401 // 240V - 1-phase @ 488.28Hz sampling rate
#define METERCONST 7399 #define METERCONST 7399
#define MUXN 0 #define MUXN 0
#warning "240V - 1-phase selected. METERCONST set to 7399" #warning "240V - 1-phase selected. METERCONST set to 7399"
#elif TYPE == 2403 // 240V - 3-phase @ 488.28Hz sampling rate #elif TYPE == 2403 // 240V - 3-phase @ 488.28Hz sampling rate
#define METERCONST 7331 #define METERCONST 7331
#define MUXN 1 #define MUXN 1
#warning "240V - 3-phase selected. METERCONST set to 7331" #warning "240V - 3-phase selected. METERCONST set to 7331"
#endif
#endif #endif
#define START 0 #define START 0