⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dc550_i2cdriver.h

📁 一款经典的数字电话设计资料
💻 H
字号:
/*****************************************************************************/
/*  CONFIDENTIAL                                                             */
/*  Sigpro Copyright 2003, All rights reserved                               */
/*****************************************************************************/
/*  CLIENT:  Telematrix                                                      */
/*  PROJECT: DC550 Digital Centrex Phone                                     */
/*  FILE:    dc550_i2cdriver.h                                               */
/*****************************************************************************/
/*  This is the header file for dc550_i2cdriver.c.                           */
/*****************************************************************************/

#ifndef DC550_I2CDRIVER_HEADER
#define DC550_I2CDRIVER_HEADER

#include  "dc550_local.h"

/******************************************************************************
 *  FUNCTION PROTOTYPES
 *****************************************************************************/
/*
 * dtmf_PlayTone(tone)
 * -------------------
 * Have the DTMF chip generate the specified tone.  The constants below
 * (in the constants section) may be used to generate the standard keypad
 * tones.  DTMF_OFF should be sent to turn off a DTMF tone.  Note, that
 * the audio channel needs to be selected properly for a user to "hear"
 * the tone.
 *
 * Input:
 *   tone - The value to be sent to the DTMF chip to generate a tone.
 *          There are a wide variety of tones available.
 *          See the Phillips PCD3312C data sheet for a complete listing.
 * Output:
 *   none.
 */
// 030321: extern void dtmf_PlayTone(unsigned char tone);

/*
 * digpot_Volume(setting)
 * ----------------------
 * Program the audio volume digital pot to the specified setting
 *
 * Input:
 *   setting - A value between 0 and 15 representing 16 different volume
 *             levels.  Lower values indicate lower volumes.
 * Output:
 *   none.
 */
extern void digpot_Volume(unsigned char setting);

/*
 * digpot_Contrast(setting)
 * ------------------------
 * Program the LCD contrast digital pot to the specified setting
 *
 * Input:
 *   setting - A value between 0 and 15 representing 16 different contrast
 *             levels for the LCD display.  Lower values indicate lower
 *             contrast levels.
 * Output:
 *   none.
 */
extern void digpot_Contrast(unsigned char setting);


/*
 * rtc_SettingTimeOfDay (void)
 * ---------------------------
 * This function returns TRUE if it's in the middle of setting the time
 * and date, and FALSE when it's finished.
 */
extern BOOL rtc_SettingTimeOfDay(void);


/*
 * rtc_SetTimeOfDay ( ... )
 * ------------------------
 * Updates the system time and date.  The year can only be specified
 * as 0, 1, 2 or 3.  This information is used to determine leap years.
 * If the full year must be retained, the caller should store this value.
 */
extern int rtc_SetTimeOfDay( int year,
                             int month,
                             int date,
                             int hour,
                             int minutes,
                             int seconds,
                             int dayOfWeek);
/*
 * rtc_GetTimeOfDay ( ... )
 * ------------------------
 * Returns the system time and date.  Only two bits of year information
 * is retained by the RTC chip.  If a NULL is passed in as one of the
 * parameters, that value will not be returned.
 */
extern int rtc_GetTimeOfDay( int *year,
                             int *month,
                             int *date,
                             int *hour,
                             int *minutes,
                             int *seconds,
                             int *dayOfWeek);

extern int eeprom_SetNumber(int address, unsigned char* number, int length);
extern int eeprom_SetSetting(int address, unsigned char value);
extern int eeprom_SetVersion(unsigned char version);
extern unsigned char eeprom_GetVersion(void);
extern int eeprom_WriteArray(int address, unsigned char* array, int arraysize);
extern int eeprom_ReadArray(int address, unsigned char* array, int arraysize);
extern int eeprom_WriteByte(int addr, unsigned char val);
extern int eeprom_ReadByte(int addr, unsigned char *val);

extern void i2cdriver_init(void);
extern void i2cdriver_exec(void);

/******************************************************************************
 *  CONSTANTS
 *****************************************************************************/

/* Standard Tones for the Numeric Keypad Buttons */
#define DTMF_ZERO      0x10
#define DTMF_ONE       0x11
#define DTMF_TWO       0x12
#define DTMF_THREE     0x13
#define DTMF_FOUR      0x14
#define DTMF_FIVE      0x15
#define DTMF_SIX       0x16
#define DTMF_SEVEN     0x17
#define DTMF_EIGHT     0x18
#define DTMF_NINE      0x19
#define DTMF_STAR      0x1E
#define DTMF_POUND     0x1F
#define DTMF_BUZZER    0x37
#define DTMF_OFF       0x23

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -