Merge branch 'master' into secperiments
This commit is contained in:
commit
0a7920c13f
8
Makefile
8
Makefile
|
@ -10,7 +10,7 @@ OBJS +=
|
||||||
OBJS += basic/basic.o
|
OBJS += basic/basic.o
|
||||||
OBJS += eeprom/eeprom.o
|
OBJS += eeprom/eeprom.o
|
||||||
OBJS += reinvoke_isp.o
|
OBJS += reinvoke_isp.o
|
||||||
LIBS += core/libcore.a lcd/libfont.a modules/libmodules.a
|
LIBS += core/libcore.a lcd/liblcd.a modules/libmodules.a
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# GNU GCC compiler flags
|
# GNU GCC compiler flags
|
||||||
|
@ -29,7 +29,7 @@ OBJS += $(TARGET)_handlers.o LPC1xxx_startup.o
|
||||||
LDLIBS = -lm
|
LDLIBS = -lm
|
||||||
LDLIBS += -Lmodules -lmodules
|
LDLIBS += -Lmodules -lmodules
|
||||||
LDLIBS += -Lcore -lcore
|
LDLIBS += -Lcore -lcore
|
||||||
LDLIBS += -Llcd -lfont
|
LDLIBS += -Llcd -llcd
|
||||||
OCFLAGS = --strip-unneeded
|
OCFLAGS = --strip-unneeded
|
||||||
|
|
||||||
LD_PATH = lpc1xxx
|
LD_PATH = lpc1xxx
|
||||||
|
@ -44,7 +44,7 @@ all: firmware
|
||||||
core/libcore.a: core/projectconfig.h
|
core/libcore.a: core/projectconfig.h
|
||||||
cd core && $(MAKE) ROOT_PATH=../$(ROOT_PATH)
|
cd core && $(MAKE) ROOT_PATH=../$(ROOT_PATH)
|
||||||
|
|
||||||
lcd/libfont.a lcd/render.o lcd/display.o:
|
lcd/liblcd.a lcd/render.o lcd/display.o:
|
||||||
cd lcd && $(MAKE) ROOT_PATH=../$(ROOT_PATH)
|
cd lcd && $(MAKE) ROOT_PATH=../$(ROOT_PATH)
|
||||||
|
|
||||||
modules/libmodules.a:
|
modules/libmodules.a:
|
||||||
|
@ -76,5 +76,5 @@ clean:
|
||||||
@cd modules && $(MAKE) clean
|
@cd modules && $(MAKE) clean
|
||||||
|
|
||||||
|
|
||||||
.PHONY: lcd/libfont.a modules/libmodules.a
|
.PHONY: lcd/liblcd.a modules/libmodules.a
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ void delayms(uint32_t ms)
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
uint8_t lcdBuffer[RESX*RESY_B];
|
uint8_t lcdBuffer[RESX*RESY_B];
|
||||||
|
int inverted = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//TODO FIXME why doenst that work ?
|
//TODO FIXME why doenst that work ?
|
||||||
|
@ -160,7 +161,16 @@ void lcdDisplay(uint32_t shift)
|
||||||
uint16_t i,page;
|
uint16_t i,page;
|
||||||
for(page=0; page<RESY_B;page++) {
|
for(page=0; page<RESY_B;page++) {
|
||||||
for(i=0; i<RESX; i++) {
|
for(i=0; i<RESX; i++) {
|
||||||
lcdWrite(1,lcdBuffer[page*RESX+((i+shift)%RESX)]);
|
if (inverted) {
|
||||||
|
lcdWrite(1,~lcdBuffer[page*RESX+((i+shift)%RESX)]);
|
||||||
|
} else {
|
||||||
|
lcdWrite(1,lcdBuffer[page*RESX+((i+shift)%RESX)]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lcdInvert(void) {
|
||||||
|
inverted = ~inverted;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,5 +22,6 @@ void lcdRead(uint8_t data);
|
||||||
void lcdInit(void);
|
void lcdInit(void);
|
||||||
void lcdFill(char f);
|
void lcdFill(char f);
|
||||||
void lcdDisplay(uint32_t shift);
|
void lcdDisplay(uint32_t shift);
|
||||||
|
void lcdInvert(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,20 +32,25 @@ void module_bsx(void) {
|
||||||
brightness++;
|
brightness++;
|
||||||
if (brightness > 100) brightness = 100;
|
if (brightness > 100) brightness = 100;
|
||||||
backlightSetBrightness(brightness);
|
backlightSetBrightness(brightness);
|
||||||
};
|
}
|
||||||
|
|
||||||
if(gpioGetValue(RB_BTN0)==0){
|
if(gpioGetValue(RB_BTN0)==0){
|
||||||
brightness--;
|
brightness--;
|
||||||
if (brightness > 100) brightness = 0;
|
if (brightness > 100) brightness = 0;
|
||||||
backlightSetBrightness(brightness);
|
backlightSetBrightness(brightness);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
if (gpioGetValue(RB_BTN3) == 0) {
|
||||||
|
while(gpioGetValue(RB_BTN3)==0);
|
||||||
|
lcdInvert();
|
||||||
|
}
|
||||||
|
|
||||||
if (gpioGetValue(RB_BTN4)==0) {
|
if (gpioGetValue(RB_BTN4)==0) {
|
||||||
while(gpioGetValue(RB_BTN4)==0);
|
while(gpioGetValue(RB_BTN4)==0);
|
||||||
DoString(0,8,"Enter ISP!");
|
DoString(0,8,"Enter ISP!");
|
||||||
lcdDisplay(0);
|
lcdDisplay(0);
|
||||||
ReinvokeISP();
|
ReinvokeISP();
|
||||||
};
|
}
|
||||||
|
|
||||||
dx = DoString(0, yctr, "Bright:");
|
dx = DoString(0, yctr, "Bright:");
|
||||||
dx = DoInt(dx, yctr, brightness);
|
dx = DoInt(dx, yctr, brightness);
|
||||||
|
@ -72,3 +77,4 @@ void module_bsx(void) {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue