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

📄 lt.h

📁 ST7的例子
💻 H
字号:
/*
*******************************************************************************
COPYRIGHT 2003 STMicroelectronics
Source File Name : lt.h
Group            : IPSW,CMG-IPDF.
Author           : MCD Application Team
Date First Issued: 8/3/2002
********************************Documentation**********************************
General Purpose - This file defines prototypes for all the functions whose 
				  source code appears in lt.c
********************************RevisionHistory********************************
_______________________________________________________________________________
Date:8/3/2002     Release:1.0
Date :23/9/2003   Release:2.0 				   	   
                  1.Removed the inclusion of lt_hr.h.
                  2.Defined the new enums for supporting LITE family & DALI.
                  3.Defined Macros for some functions.
                  4.Included necessary comments.
Date :28/04/04    MISRA changes

******************************************************************************/
#ifndef LITE_H
#define LITE_H                            /* To avoid the multiple inclusion */

#include "ST7lib_config.h" 			     /* for device selection */


                  
/*---------------------------------------------------------------------------*/
/*             Enum parameters for the function LT_Init                      */
typedef enum { 
              LT_ICAP_IT_ENABLE = (unsigned char) 0x80, 
              LT_TB_IT_ENABLE   = (unsigned char) 0x10,
              LT_TB1_IT_ENABLE  = (unsigned char) 0x10,
              LT_TB2_IT_ENABLE  = (unsigned char) 0x02,
              LT_DEFAULT        = (unsigned char) 0x00
             }Lt_InitParameter;

/*---------------------------------------------------------------------------*/
/*             Enum parameters for the function LT_TB                        */
typedef enum {
              LT_SET_TB_1,
              LT_SET_TB_2
             }Lt_TB_Param;

/*---------------------------------------------------------------------------*/
/*             Enum parameters for the function LT_Disable                   */
typedef enum {
              LT_ICAP_IT_DISABLE = (unsigned char)0x80,
              LT_TB_IT_DISABLE   = (unsigned char)0x10,
              LT_TB1_IT_DISABLE  = (unsigned char)0x10,
              LT_TB2_IT_DISABLE  = (unsigned char)0x02, 
              LT_WDG_DISABLE     = (unsigned char)0x02
             }Lt_Disable_Param;
	      	
/*---------------------------------------------------------------------------*/  
/*             Enum parameters for the function LT_Status_Flag,LT_Clear_Flag */
typedef enum {
              LT_FLAG_TBF,
              LT_FLAG_TB1F,
              LT_FLAG_TB2F,
              LT_FLAG_ICF,
              LT_FLAG_WDGRF
             }Lt_Flag;   

/*---------------------------------------------------------------------------*/
/*             Enum parameters for the function LT_WDG_Reset                 */
typedef enum {
              LT_DELAY_WDG_RESET, 			
              LT_FORCD_WDG_RESET
             }Lt_Reset_Param; 

/*---------------------------------------------------------------------------*/
                                        /* Macro gets the input capture value*/
#define LT_ICAP_Getvalue()      (LTICR)
                                        /* Macro loads the Autoreload Reg    */
#define LT_ARR_WriteValue(X)    ((LTARR) = (X))
                                        /* Macro gets the Autoreload value   */
#define LT_ARR_ReadValue()      (LTARR)
                                        /* Macro reads the Counter Reg value */
#define LT_CNTR_ReadValue()     (LTCNTR)


void LT_Init(Lt_InitParameter InitValue);       /* Initialise Lite Timer */
void LT_TB(Lt_TB_Param TBValue);                        /* Set time base */ 

void LT_Clear_Flag(Lt_Flag FLAG_F);                      /* Clear a flag */
BOOL LT_Status_Flag(Lt_Flag FLAG_F);         	 /* Get the status of a flag */
void LT_Disable(Lt_Disable_Param DValue);      	   /* Disable interrupts,WDG */

#endif /* LT_H */

/**********   (c) 2003  ST Microelectronics **************END OF FILE ********/

⌨️ 快捷键说明

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