diff --git a/src/Makefile b/src/Makefile index 0624dd58a..480fb2acb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -50,7 +50,7 @@ DELAY = 5 #----------- BUILD OPTIONS --------------------------- # PCB version -# Values: STD, V4, ARM +# Values: STD, STD128, V4, ARM PCB = STD # PCB revision @@ -214,6 +214,12 @@ ifeq ($(PCB), STD) XCURVES = NO endif +ifeq ($(PCB), STD128) + TRGT = avr- + MCU = atmega128 + CPPDEFS += -DF_CPU=$(F_CPU)UL +endif + ifeq ($(PCB), V4) ifeq ($(PCBREV), REV0) CPPDEFS += -DREV0 @@ -465,6 +471,37 @@ ifeq ($(PCB), V4) endif endif +ifeq ($(PCB), STD128) + # STD PCB with Atmega 128, so ... + OPT = 2 + CPPDEFS += -DPCBSTD -DM128 + EXTRAINCDIRS += stock + BOARDSRC = board_stock.cpp + EEPROMSRC = eeprom_avr.cpp + PULSESSRC = pulses_avr.cpp + + ifeq ($(AUDIO), YES) + CPPDEFS += -DAUDIO + CPPSRC += stock/audio.cpp + else + CPPSRC += beeper.cpp + endif + + ifeq ($(VOICE), YES) + CPPSRC += stock/voice.cpp + CPPDEFS += -DVOICE + endif + + ifeq ($(HAPTIC), YES) + CPPDEFS += -DHAPTIC + CPPSRC += haptic.cpp + endif + + ifeq ($(SP22), YES) + CPPDEFS += -DSP22 + endif +endif + ifeq ($(PCB), STD) # STD PCB, so ... OPT = s diff --git a/src/eeprom_avr.h b/src/eeprom_avr.h index 88b430d53..147f437d6 100644 --- a/src/eeprom_avr.h +++ b/src/eeprom_avr.h @@ -47,7 +47,7 @@ extern uint16_t s_eeDirtyTime10ms; // bs=16 128 blocks verlust link:128 16files:16*8 128 sum 256 // bs=32 64 blocks verlust link: 64 16files:16*16 256 sum 320 // -#if defined(PCBV4) +#if defined(PCBV4) || defined(M128) #define EESIZE 4096 #define EEFS_VERS 5 #define MAXFILES 36 @@ -84,7 +84,7 @@ PACK(struct EeFs{ #define RESV sizeof(EeFs) //reserv for eeprom header with directory (eeFs) -#if defined(PCBV4) +#if defined(PCBV4) || defined(M128) #define FIRSTBLK 1 #define BLOCKS (1+(EESIZE-RESV)/BS) #define BLOCKS_OFFSET (RESV-BS) diff --git a/src/myeeprom.h b/src/myeeprom.h index 5df295a58..89dcda473 100644 --- a/src/myeeprom.h +++ b/src/myeeprom.h @@ -607,7 +607,7 @@ PACK(typedef struct t_PhaseData { #define MAX_EXPOS 32 #define NUM_CSW 32 // number of custom switches #define NUM_FSW 32 // number of functions assigned to switches -#elif defined(PCBV4) +#elif defined(PCBV4) || defined(M128) #define MAX_MODELS 30 #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 #define MAX_PHASES 5 diff --git a/src/open9x.cpp b/src/open9x.cpp index 87e13ac09..592887dbd 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -193,7 +193,7 @@ CustomSwData *cswaddress(uint8_t idx) return &g_model.customSw[idx]; } -#if defined(PCBSTD) +#if defined(PCBSTD) && !defined(M128) void memclear(void *ptr, uint8_t size) { memset(ptr, 0, size); @@ -1156,7 +1156,7 @@ void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SO { lcd_clear(); -#if defined(PCBV4) || defined(PCBARM) || defined(EXTSTD) +#if defined(PCBV4) || defined(PCBARM) || defined(M128) || defined(EXTSTD) lcd_img(2, 0, asterisk_lbm, 0, 0); #else lcd_putsAtt(0, 0, PSTR("(!)"), DBLSIZE); diff --git a/src/open9x.h b/src/open9x.h index 53dd409b2..11baa7998 100644 --- a/src/open9x.h +++ b/src/open9x.h @@ -628,7 +628,7 @@ uint16_t getTmr16KHz(); uint16_t stack_free(); -#if defined(PCBSTD) +#if defined(PCBSTD) && !defined(M128) void memclear(void *ptr, uint8_t size); #else #define memclear(p, s) memset(p, 0, s) diff --git a/src/simpgmspace.cpp b/src/simpgmspace.cpp index e187440de..70ad2af3a 100644 --- a/src/simpgmspace.cpp +++ b/src/simpgmspace.cpp @@ -177,15 +177,6 @@ void *main_thread(void *) if (main_thread_running == 1) { #if defined(SPLASH) doSplash(); -#elif defined(PCBSTD) && defined(VOICE) - lcd_clear(); - lcd_putsAtt(20, 28, PSTR("Open9x..."), DBLSIZE); - refreshDisplay(); - tmr10ms_t tgtime = get_tmr10ms() + (2*100); /* 2 seconds */ - while (tgtime != get_tmr10ms()/* && !keyDown()*/) { - if (!main_thread_running) break; - sleep(1/*ms*/); - } #endif #if !defined(PCBARM)