Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions driver/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,23 @@ void display_all_off(void)
lcdptr++;
}
}

#ifdef ECO_DISPLAY
// *************************************************************************************************
// @fn eco_display
// @brief Lowers the display frequency at night(19h-08h)
// @param none
// @return none
// *************************************************************************************************
void eco_display(void)
{
if((sTime.hour>8)&&(sTime.hour<19))
{
LCDBCTL0 = (LCDDIV0 + LCDDIV1 + LCDDIV2) | (LCDPRE0 + LCDPRE1) | LCD4MUX | LCDON; //day mode 512Hz
}
else
{
LCDBCTL0 = (LCDDIV0 + LCDDIV1 + LCDDIV2 + LCDDIV3) | (LCDPRE0 + LCDPRE1) | LCD4MUX | LCDON; //night mode, freq. from the original ti frimware 256Hz
}
}
#endif
4 changes: 3 additions & 1 deletion driver/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,5 +370,7 @@ extern u8 * itoa(u32 n, u8 digits, u8 blanks);
extern u8 switch_seg(u8 line, u8 index1, u8 index2);

void display_all_off(void);

#ifdef ECO_DISPLAY
void eco_display(void); //ECO display
#endif
#endif // __DISPLAY_
10 changes: 10 additions & 0 deletions driver/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,16 @@ __interrupt void TIMER0_A0_ISR(void)
return;
}

// -------------------------------------------------------------------
// Service modules that require 1/hour processing
if (sTime.drawFlag > 2)
{
#ifdef ECO_DISPLAY
request.flag.eco_display = 1; //ECO_display flag
#endif
}


// -------------------------------------------------------------------
// Service modules that require 1/min processing
if (sTime.drawFlag >= 2)
Expand Down
4 changes: 4 additions & 0 deletions ezchronos.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,10 @@ void wakeup_event(void)
// *************************************************************************************************
void process_requests(void)
{
#ifdef ECO_DISPLAY
// Change display freq when needed
if (request.flag.eco_display) eco_display();
#endif
// Do temperature measurement
if (request.flag.temperature_measurement) temperature_measurement(FILTER_ON);

Expand Down
3 changes: 3 additions & 0 deletions include/project.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ typedef union
#endif
#ifdef CONFIG_STRENGTH
u16 strength_buzzer : 1; // 1 = Output buzzer from strength_data
#endif
#ifdef ECO_DISPLAY
u16 eco_display : 1; // 1 = LCD refresh freq is lower at night
#endif
} flag;
u16 all_flags; // Shortcut to all display flags (for reset)
Expand Down
8 changes: 7 additions & 1 deletion tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,13 @@ def rand_hw():
"name": "Use PPT",
"depends": [],
"default": True}


###IMPLEMENTED by Dobfek 2011-09-04
DATA["ECO_DISPLAY"] = {
"name": "Economical display. Lower display frequency and -30% current consumption at night.",
"depends": [],
"default": False}

DATA["CONFIG_USE_SYNC_TOSET_TIME"] = {
"name": "Sync is the only way to set clocks data/time",
"depends": [],
Expand Down