From: Kevin Rosenberg Date: Fri, 21 Mar 2008 21:14:04 +0000 (-0600) Subject: 20080320 release X-Git-Url: http://git.kpe.io/?p=avr_serial_lcd.git;a=commitdiff_plain;h=d84f5cbda7d77ffecbae2aa728b50cd0b02121b3 20080320 release --- diff --git a/ChangeLog b/ChangeLog index aaf43bb..2ca0c15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-22 Kevin Rosenberg + * serial_lcd.c: Add note about processing data overrun flag + +2008-03-21 Kevin Rosenberg + * serial_lcd.c: Fix typo for ICC and CV compilers and add USART RX + framing error check. Added protection against size optimization on + timed sequences for CV. Thanks to Lee Theusch for the these ideas. + 2008-03-20 Kevin Rosenberg * serial_lcd.h, serial_lcd.c: Switch to using native delay and sleep functions for Codevision. diff --git a/README b/README index 018a7b6..b2704c3 100644 --- a/README +++ b/README @@ -43,12 +43,12 @@ Code/Data Sizes (for 20080320 release) Compiler Code Data Notes --------- ---- ---- ----- -IAR 5.10A C 622 48 Size optimization high (+ 64 bytes stack) -AVR-GCC 4.2.2 C 716 48 -Os +IAR 5.10A C 626 48 Size optimization high (+ 64 bytes stack) +AVR-GCC 4.2.2 C 720 48 -Os IAR 5.10A C++ 762 49 Size optimization high (+ 64 bytes stack) -Codevision 2.02.6 792 48 Maximum size optimization +Codevision 2.02.6 796 48 Maximum size optimization AVR-GCC 4.2.2 C++ 806 50 -Os -ImageCraft 7.16 Pro C 808 48 Full optimizations (-O24) +ImageCraft 7.16 Pro C 806 48 Full optimizations (-O24) AVR-GCC 4.2.2 C++ Obj 1574 72 -Os IAR 5.10A C++ Obj 1112 65 Size optimization high (+ 63 bytes stack) diff --git a/cv_c/serial_lcd.prj b/cv_c/serial_lcd.prj index ac3eea8..fc1ab0d 100644 --- a/cv_c/serial_lcd.prj +++ b/cv_c/serial_lcd.prj @@ -7,11 +7,11 @@ Top0=430 Left0=711 Height0=339 Width0=497 -Active0=1 +Active0=0 State0=0 OF1=C:\home\kevin\pub\src\avr_serial_lcd\serial_lcd.c -Top1=258 -Left1=269 +Top1=232 +Left1=43 Height1=337 Width1=495 Row1=0 @@ -108,7 +108,7 @@ WarningDataStackUsage=1 WarningDataStackRecursion=1 WarningHardwareStackLow=1 DebugBootLoader=0 -Build=20 +Build=25 UseEEPROMLocation0=1 IncludePath0= IncludePath1= diff --git a/serial_lcd.c b/serial_lcd.c index 75983d2..899e945 100644 --- a/serial_lcd.c +++ b/serial_lcd.c @@ -105,12 +105,12 @@ REGISTER_VAR(unsigned char ledPwmCycling, "r7", 12); #define ledPwmPattern GPIOR0 #if defined(REGISTER_BIT) #define BIT_led_on REGISTER_BIT(GPIOR1,0) -#define BACKLIGHT_STATUS() BIT_led_on +#define IS_BACKLIGHT_ON() BIT_led_on #define BACKLIGHT_OFF() BIT_led_on = 0 #define BACKLIGHT_ON() BIT_led_on = 1 #else -#define BACKLIGHT_STATUS() (GPIOR1 & 0x01) -#define BACKLIGHT_OFF() GPIOR1 &=~ ~0x01 +#define IS_BACKLIGHT_ON() (GPIOR1 & 0x01) +#define BACKLIGHT_OFF() GPIOR1 &= ~0x01 #define BACKLIGHT_ON() GPIOR1 |= 0x01 #endif @@ -159,7 +159,7 @@ static inline void LedPwmSetBrightness (unsigned char brightness) { unsigned char ledPwmPos; if (brightness == 0) { // turn backlight off for 0 brightness - if (BACKLIGHT_STATUS()) { + if (IS_BACKLIGHT_ON()) { LedTimerStop(); ledPwmPattern = 0; ledPwmCycling = 0; @@ -178,12 +178,12 @@ static inline void LedPwmSetBrightness (unsigned char brightness) { ledPwmCycling = ledPwmPattern; if (ledPwmPos >= LED_BRIGHTNESS_LEVELS-1) { // maximum brightness // don't need PWM for continuously on - if (BACKLIGHT_STATUS()) { + if (IS_BACKLIGHT_ON()) { LedTimerStop(); LED_PORT |= (1<