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

📄 tpu_fqd.h

📁 mpc564 时钟中断 时钟中断
💻 H
字号:
/**************************************************************************/
/* FILE NAME: tpu_fqd.h                       COPYRIGHT (c) MOTOROLA 2002 */
/* VERSION: 1.0                                   All Rights Reserved     */
/*                                                                        */
/* DESCRIPTION: This file defines the interface to the TPU FQD functions  */
/* and provides useful #defines.                                          */
/*                                                                        */
/*========================================================================*/
/* HISTORY           ORIGINAL AUTHOR: Jeff Loeliger                       */
/* REV      AUTHOR      DATE       DESCRIPTION OF CHANGE                  */
/* ---   -----------  ---------    ---------------------                  */
/* 1.0   J. Loeliger  03/Aug/02    Initial version of function.           */
/**************************************************************************/
#ifndef _TPU_FQD_H
#define _TPU_FQD_H

#include "m_common.h"
#include "m_tpu3.h"

/* Define HSR values */
#define TPU_FQD_INIT 0x3
#define TPU_FQD_READ_TCR1 0x2

/* Define HSQ values */
#define TPU_FQD_PRIMARY_CHANNEL 0x0
#define TPU_FQD_SECONDARY_CHANNEL 0x1
#define TPU_FQD_NORMAL_MODE 0x0
#define TPU_FQD_FAST_MODE 0x2

/* Define pin state */
#define TPU_FQD_PIN_HIGH 0x8000
#define TPU_FQD_PIN_LOW  0x0000

/* Define parameter RAM locations */
#define TPU_FQD_EDGE_TIME          0
#define TPU_FQD_POSITION_COUNT     1
#define TPU_FQD_TCR1_VALUE         2
#define TPU_FQD_CHAN_PINSTATE      3
#define TPU_FQD_CORR_PINSTATE_ADDR 4
#define TPU_FQD_EDGE_TIME_LSB_ADDR 5

/* TPU FQD function prototypes */
void tpu_fqd_init(struct TPU3_tag *tpu, UINT8 channel, UINT8 priority, \
                INT16 init_position);
void tpu_fqd_init_trans_count(struct TPU3_tag *tpu, UINT8 channel, \
                UINT8 priority);

void tpu_fqd_mode(struct TPU3_tag *tpu, UINT8 channel, UINT8 mode );
UINT8 tpu_fqd_current_mode(struct TPU3_tag *tpu, UINT8 channel);

INT16 tpu_fqd_position(struct TPU3_tag *tpu, UINT8 channel);

void tpu_fqd_data(struct TPU3_tag *tpu, UINT8 channel, INT16 *tcr1, \
                INT16 *edge, INT16 *primary_pin, INT16 *secondary_pin);

#endif /* ifndef _TPU_FQD_H  */

/*********************************************************************
 *
 * Copyright:
 *	MOTOROLA, INC. All Rights Reserved.  
 *  You are hereby granted a copyright license to use, modify, and
 *  distribute the SOFTWARE so long as this entire notice is
 *  retained without alteration in any modified and/or redistributed
 *  versions, and that such modified versions are clearly identified
 *  as such. No licenses are granted by implication, estoppel or
 *  otherwise under any patents or trademarks of Motorola, Inc. This 
 *  software is provided on an "AS IS" basis and without warranty.
 *
 *  To the maximum extent permitted by applicable law, MOTOROLA 
 *  DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING 
 *  IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
 *  PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE 
 *  SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY 
 *  ACCOMPANYING WRITTEN MATERIALS.
 * 
 *  To the maximum extent permitted by applicable law, IN NO EVENT
 *  SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING 
 *  WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS 
 *  INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY
 *  LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.   
 * 
 *  Motorola assumes no responsibility for the maintenance and support
 *  of this software
 ********************************************************************/

⌨️ 快捷键说明

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