?? scroll.c
字號:
/***************************************************************************
* This code and information is provided "as is" without warranty of any *
* kind, either expressed or implied, including but not limited to the *
* implied warranties of merchantability and/or fitness for a particular *
* purpose. *
* *
* Copyright (C) 2006 Teridian Semiconductor Corp. All Rights Reserved. *
***************************************************************************/
//**************************************************************************
// DESCRIPTION: 71M652x POWER METER - Scroll Routines.
//
// AUTHOR: MTF
//
// HISTORY: See end of file.
//**************************************************************************
// File: SCROLL.C
//
#include "options.h"
#if SCROLL_METER
#include "defaults.h"
#include "meter.h"
// Table of selection for scrolling
const uint8_t code alcdNext[] = {
#if WATT_ELEMENT
M_WH,
#if EXPORT
M_WHE,
#endif
#endif
#if VAR_ELEMENT
M_VARH,
#if EXPORT
M_VARHE,
#endif
#endif
#if VA_ELEMENT
M_VAH,
#endif
#if OPERATING_TIME
M_HOURS,
#endif
#if REAL_TIME_DATE
M_TIME,
M_DATE,
#endif
#if POWER_FACTOR
M_PF,
#endif
#if PHASE_ANGLES
M_VI_ANGLE,
#endif
#if VOLTAGE_PHASES
M_VPHASE,
#endif
#if MAIN_EDGE_COUNT
M_EDGE_CNT,
#endif
#if PULSE_CNT
M_PULSE,
#endif
#if RMS_VALUES
M_IRMS,
M_VRMS,
#endif
#if BATTERY_TEST
M_BATTEST,
#endif
#if TEMPERATURE
M_TEMP,
#endif
#if FREQUENCY
M_FREQ,
#endif
M_NULL // mark the end of the table
};
// find the next LCD display, given an index to the LCD display
static uint8_t next_lcd (uint8_t lcdIn)
{
uint8_t ilcdNext, lcdNext;
for (ilcdNext = 0; ilcdNext < MAX_TOTAL; ++ilcdNext)
{
if (alcdNext[ilcdNext] == lcdIn)
{
lcdNext = alcdNext[ilcdNext+1];
if (lcdNext == M_NULL)
lcdNext = alcdNext[0];
return lcdNext;
}
}
return alcdNext[0];
}
void scroll_meter (void)
{
if (BUTTON_PRESSED || select_total >= MAX_TOTAL)
{
select_total = next_lcd (select_total);
}
}
#endif // SCROLL_METER
/***************************************************************************
* History:
* $Log: scroll.c,v $
* Revision 1.2 2006/09/12 02:45:14 gmikef
* *** empty log message ***
*
* Revision 1.1 2006/09/09 01:43:42 gmikef
* Split out scrolling function.
*
*
* Copyright (C) 2006 Teridian Semiconductor Corp. All Rights Reserved. *
* this program is fully protected by the United States copyright *
* laws and is the property of Teridian Semiconductor Corporation. *
***************************************************************************/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -