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

📄 fc161.h

📁 我在开发CC2500和CC1100时就用了SmartRF Studio调试软硬件,很好用的,我可以做出兼容chipcon的SmartRF 硬件,不知道有没人有兴趣?
💻 H
字号:
/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : FC161.H
**     Project   : Project_1
**     Processor : MC9S08QD4CPC
**     Beantype  : FreeCntr16
**     Version   : Bean 02.059, Driver 01.11, CPU db: 2.87.049
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 2008-2-18, 11:16
**     Abstract  :
**         This device "FreeCntr16" implements 16-bit Free Running Counter
**     Settings  :
**         Timer name                  : TPM1 (16-bit)
**         Compare name                : TPM10
**         Counter shared              : No
**
**         High speed mode
**             Prescaler               : divide-by-1
**             Clock                   : 15625 Hz
**           Resolution of timer
**             Xtal ticks              : 512
**             microseconds            : 16384
**             milliseconds            : 16
**             seconds (real)          : 0.0163840
**             Hz                      : 61
**
**         Initialization:
**              Timer                  : Enabled
**
**         Timer registers
**              Counter                : TPMCNT    [$0041]
**              Mode                   : TPMSC     [$0040]
**              Run                    : TPMSC     [$0040]
**              Prescaler              : TPMSC     [$0040]
**
**         Compare registers
**              Compare                : TPMC0V    [$0046]
**     Contents  :
**         Reset     - byte FC161_Reset(void);
**         GetTimeUS - byte FC161_GetTimeUS(word *Time);
**         GetTimeMS - byte FC161_GetTimeMS(word *Time);
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2006
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __FC161
#define __FC161

/* MODULE FC161. */

/*Include shared modules, which are used for whole project*/
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "PE_Timer.h"
#include "Cpu.h"

byte FC161_Reset(void);
/*
** ===================================================================
**     Method      :  FC161_Reset (bean FreeCntr16)
**
**     Description :
**         Clears the counter.
**     Parameters  : None
**     Returns     :
**         ---       - Error Code
** ===================================================================
*/

byte FC161_GetTimeUS(word *Time);
/*
** ===================================================================
**     Method      :  FC161_GetTimeUS (bean FreeCntr16)
**
**     Description :
**         Returns the time (as a 16-bit unsigned integer) in microseconds
**         since the last resetting after the last reset.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * Time            - A pointer to the returned 16-bit value
**                           in microseconds
**     Returns     :
**         ---             - Error code, possible codes:
**                           ERR_OK - OK
**                           ERR_SPEED - This device does not work in
**                           the active speed mode
**                           ERR_OVERFLOW - Software counter overflow
**                           ERR_MATH - Overflow during evaluation
** ===================================================================
*/

byte FC161_GetTimeMS(word *Time);
/*
** ===================================================================
**     Method      :  FC161_GetTimeMS (bean FreeCntr16)
**
**     Description :
**         Returns the time (as a 16-bit unsigned integer) in milliseconds
**         since the last resetting after the last reset.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * Time            - A pointer to the returned 16-bit value
**                           in milliseconds
**     Returns     :
**         ---             - Error code, possible codes:
**                           ERR_OK - OK
**                           ERR_SPEED - This device does not work in
**                           the active speed mode
**                           ERR_OVERFLOW - Software counter overflow
**                           ERR_MATH - Overflow during evaluation
** ===================================================================
*/

void FC161_Init(void);
/*
** ===================================================================
**     Method      :  FC161_Init (bean FreeCntr16)
**
**     Description :
**         Initializes the associated peripheral(s) and the beans 
**         internal variables. The method is called automatically as a 
**         part of the application initialization code.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

__interrupt void FC161_Interrupt(void);
/*
** ===================================================================
**     Method      :  FC161_Interrupt (bean FreeCntr16)
**
**     Description :
**         The method services the interrupt of the selected peripheral(s)
**         and eventually invokes the beans event(s).
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define FC161_SetCV(_Val) { \
  TPMC0V = (word)_Val; \
  TPMMOD = (word)_Val; \
}
/*
** ===================================================================
**     Method      :  SetCV (bean FreeCntr16)
**
**     Description :
**         The method computes and sets compare eventually modulo value 
**         for time measuring.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/


/* END FC161. */

#endif /* ifndef __FC161 */
/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 3.00 [03.89]
**     for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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