?? timer.h
字號:
/*
*******************************************************************************
**
** This device driver was created by Applilet for the 78K0/KB2, 78K0/KC2,
** 78K0/KD2, 78K0/KE2 and 78K0/KF2 8-Bit Single-Chip Microcontrollers.
**
** Copyright(C) NEC Electronics Corporation 2002 - 2005
** All rights reserved by NEC Electronics Corporation.
**
** This program should be used on your own responsibility.
** NEC Electronics Corporation assumes no responsibility for any losses
** incurred by customers or third parties arising from the use of this file.
**
** Filename : timer.h
** Abstract : This file implements a device driver for the timer module
** APIlib: NEC78K0KX2.lib V1.01 [09 Aug. 2005]
**
** Device : uPD78F0513(44-pin)
**
** Compiler: NEC/CC78K0
**
*******************************************************************************
*/
#ifndef _MDTIMER_
#define _MDTIMER_
enum TMChannel { TMChannel0, TMChannel1 };
/*
*******************************************************************************
** MacroDefine
*******************************************************************************
*/
#define REGVALUE_MAX 0xff
#define TM_TM00_CLOCK 0x0
#define TM_TM00_INTERVALVALUE 0x00
#define TM_TM00_SQUAREWIDTH 0x00
#define TM_TM00_PPGCYCLE 0x00
#define TM_TM00_PPGWIDTH 0x00
#define TM_TM00_ONESHOTCYCLE 0x00
#define TM_TM00_ONEPULSEDELAY 0x00
#define TM_TM50_CLOCK 0x4
#define TM_TM50_INTERVALVALUE 0xc7
#define TM_TM50_SQUAREWIDTH 0xc7
#define TM_TM50_PWMACTIVEVALUE 0xc7
#define TM_TM51_CLOCK 0x2
#define TM_TM51_INTERVALVALUE 0x00
#define TM_TM51_SQUAREWIDTH 0x00
#define TM_TM51_PWMACTIVEVALUE 0x00
#define TM_TMH0_CLOCK 0x0
#define TM_TMH0_INTERVALVALUE 0x00
#define TM_TMH0_SQUAREWIDTH 0x00
#define TM_TMH0_PWMCYCLE 0x00
#define TM_TMH0_PWMDELAY 0x00
#define TM_TMH1_CLOCK 0x0
#define TM_TMH1_INTERVALVALUE 0x00
#define TM_TMH1_SQUAREWIDTH 0x00
#define TM_TMH1_PWMCYCLE 0x00
#define TM_TMH1_PWMDELAY 0x00
#define TM_TMH1_CARRIERDELAY 0x00
#define TM_TMH1_CARRIERWIDTH 0x00
/* timer00 to 01,50,51,H0,H1 configurator initiation */
void TM00_Init(void);
void TM50_Init(void);
/*timer start*/
void TM00_Start(void);
void TM50_Start(void);
/*timer stop*/
void TM00_Stop(void);
void TM50_Stop(void);
MD_STATUS TM50_ChangeTimerCondition(UCHAR value);
MD_STATUS TM00_GetPulseWidth( ULONG *activewidth, ULONG *inactivewidth, enum TMChannel channel );
__interrupt void MD_INTTM010(void);
#endif /* _MDTIMER_*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -