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

📄 timer.h

📁 基于MMA7260QR2的跌落检查程序
💻 H
📖 第 1 页 / 共 2 页
字号:
@param   TmrMode_t tmrMode                  - timer working mode

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c
          gTmrErrTimerNotEnabled_c    
          gTmrErrTimerBusy_c
 
 Revision history:
   date                              Author                           Comments
   ----------               ----------------------                    -------
   03.07.2006                        B04839                           Created
*/
/*===============================================================================================*/
extern TmrErr_t TmrSetMode(TmrNumber_t tmrNumber, TmrMode_t tmrMode);

/*================================================================================================*/
/*===== TmrSetConfig =====*/
/**
@brief  The function is called to set the parameters for the Timer peripheral.

@param  TmrNumber_t tmrNumber               - number of the timer instance to enable
@param    TmrConfig_t* pConfig              - input parameter: pointer to a structure containing the configuration 
                                              parameters.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabled_c
          gTmrErrNoCallbackDefined

 Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/
/*================================================================================================*/
extern TmrErr_t TmrSetConfig(TmrNumber_t tmrNumber, TmrConfig_t* pconfig);

/*================================================================================================*/
/*===== TmrSetStatusControl =====*/
/**
@brief  This function is called to set the level of the Rx FIFO threshold.

@param  TmrNumber_t tmrNumber               - input parameter: number of the timer instance to configurate.
@param  TmrStatusCtrl_t *pStatusCtrl        - input parameter: pointer to a structure containing the control parameters.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabled_c
    
Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrSetStatusControl(TmrNumber_t tmrNumber, TmrStatusCtrl_t* pStatusCtrl);

/*================================================================================================*/
/*===== TmrSetComparatorStatusControl =====*/
/**
@brief  The function is called to set the comparator configuration of the timer peripheral instance.

@param  uint8_t  tmrNumber                         - input parameter: number of the timer instance to configurate comparator.
@param  TmrComparatorStatusCtrl_t* pCompStatusCtrl - input parameter: pointer to a structure where the comparator configuration 
                                                     parameters shall be placed.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c 
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabled_c
  
Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrSetCompStatusControl(TmrNumber_t tmrNumber, TmrComparatorStatusCtrl_t* pCompStatusCtrl);

/*================================================================================================*/
/*===== TmrSetCallbackFunction =====*/
/**
@brief  This function will be called to set the callback functions for the timer driver.

@param  TmrNumber_t tmrNumber               - input parameter: number of the Timer instance to set the callback function.
@param  TmrCallbackFunction_t *pCallback    - input parameter: pointer to a structure containing the pointer to the callback 
                                              function.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c 
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabed_c
   
Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrSetCallbackFunction(TmrNumber_t tmrNumber, TmrEvent_t tmrEvent, TmrCallbackFunction_t pCallbackFunc);

/*================================================================================================*/
/*===== TmrWriteValue =====*/
/**
@brief  The function is called to write a new value to the timer register to be used as the base for its next count.

@param  uint8_t  tmrNumber                  - input parameter: number of the Timer instance to write to.
@param  uint16_t value                      - input parameter: value to be used as the base for the next count.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c
          gTmrErrTimerNotEnabled_c
   
Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrWriteValue( TmrNumber_t tmrNumber, uint16_t value);

/*================================================================================================*/
/*===== TmrGetMode =====*/
/**
@brief  The function is called to get the working mode of the timer peripheral specified as parameter. 

@param  uint8_t  tmrNumber                  - input parameter: number of the timer instance to get configuration from.
@param   TmrMode_t *tmrMode                 - input parameter: pointer to a structure where the timer working mode shall 
                                              be placed.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c
          gTmrErrTimerNotEnabled_c
          gTmrErrNullPointer_c
    
Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrGetMode(TmrNumber_t tmrNumber, TmrMode_t *pTmrMode);

/*================================================================================================*/
/*===== TmrGetConfig =====*/
/**
@brief  The function is called to get the configuration of the timer peripheral specified as parameter. 

@param  uint8_t  tmrNumber                  - input parameter: number of the timer instance to get working mode from.
@param  TmrConfig_t *pConfig                - input parameter: pointer to a structure where the configuration parameters 
                                              shall be placed.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabled_c
    
Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrGetConfig(TmrNumber_t tmrNumber, TmrConfig_t* pconfig);

/*================================================================================================*/
/*===== TmrGetStatusControl =====*/
/**
@brief  The function is called to get the status of the timer peripheral instance.

@param  uint8_t  tmrNumber                  - input parameter: number of the timer instance to get status from.
@param  TmrStatusCtrl_t *pStatusCtrl        - input parameter: pointer to a structure where the status parameters shall 
                                              be placed.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c 
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabled_c
    
Revision history:
   date                             Author                            Comments
   ----------               ----------------------                    -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrGetStatusControl(TmrNumber_t tmrNumber, TmrStatusCtrl_t* pStatusCtrl);

/*================================================================================================*/
/*===== TmrGetComparatorStatusControl =====*/
/**
@brief  The function is called to get the comparator status of the timer peripheral instance.

@param  uint8_t  tmrNumber                         - input parameter: number of the timer instance to get comparator status.
@param  TmrComparatorStatusCtrl_t* pCompStatusCtrl - input parameter: pointer to a structure where the comparator status 
                                                     parameters shall be placed.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c 
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabled_c
  
Revision history:
   date                         Author                                Comments
   ----------               ----------------------                    -------
   03.07.2006                   B04839                                Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrGetCompStatusControl(TmrNumber_t tmrNumber, TmrComparatorStatusCtrl_t* pCompStatusCtrl);

/*================================================================================================*/
/*===== TmrReadValue =====*/
/**
@brief  The function is called to read a new value from the timer register.

@param  uint8_t  tmrNumber                  - input parameter: number of the Timer instance to read from
@param  uint16_t *value                     - input parameter: memory place where the new value from timer register 
                                              will be placed.

@return parameter of type TmrErr_t with following possible values (they are self-explaining):

          gTmrErrNoError_c
          gTmrErrInvalidParameter_c
          gTmrErrNullPointer_c
          gTmrErrTimerNotEnabled_c

Revision history:
   date                         Author                                  Comments
   ----------               ----------------------                      -------
   03.07.2006                   B04839                                  Created
*/   
/*================================================================================================*/
extern TmrErr_t TmrReadValue(TmrNumber_t tmrNumber,  uint16_t* pvalue);    

/*================================================================================================*/
/*===== TmrIsr =====*/
/**
@brief  Timer interrupt service routine.

@param  None

@return None

Revision history:
      date                          Author                            Comments
   ----------              ----------------------                     -------
   03.07.2006                       B04839                            Created
*/   
/*================================================================================================*/
extern void TmrIsr(void);

#endif  /* _TIMER_H_ */

⌨️ 快捷键说明

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