📄 tpu_qom.h
字号:
/**************************************************************************/
/* FILE NAME: tpu_qom.h COPYRIGHT (c) MOTOROLA 2002 */
/* VERSION: 1.0 All Rights Reserved */
/* */
/* DESCRIPTION: This file defines the interface to the TPU QOM function */
/* and provides useful #defines. */
/* */
/*========================================================================*/
/* HISTORY ORIGINAL AUTHOR: Jeff Loeliger */
/* REV AUTHOR DATE DESCRIPTION OF CHANGE */
/* --- ----------- --------- --------------------- */
/* 1.0 J. Loeliger 21/Sept/02 Initial version of function. */
/**************************************************************************/
#ifndef _TPU_QOM_H
#define _TPU_QOM_H
#include "m_common.h"
#include "m_tpu3.h"
union event_tag {
UINT16 p;
struct {
UINT16 offset:15;
UINT16 pin:1;
} b;
};
/* Define edges for action after delay */
#define TPU_QOM_FALLING_EDGE 0
#define TPU_QOM_RISING_EDGE 1
/* Define operating modes (also HSQ values) */
#define TPU_QOM_SINGLE_SHOT 0
#define TPU_QOM_LOOP 1
#define TPU_QOM_CONTINUOUS 2
/* Define timebases */
#define TPU_QOM_TCR1 0
#define TPU_QOM_TCR2 1
/* Define initial pin state (also HSR values) */
#define TPU_QOM_INIT_PIN_NO_CHANGE 1
#define TPU_QOM_INIT_PIN_LOW 2
#define TPU_QOM_INIT_PIN_HIGH 3
/* Define reference for first match */
#define TPU_QOM_IMMEDIATE 0
#define TPU_QOM_LAST_EVENT 1
#define TPU_QOM_REF 2
/* TPU QOM function prototypes */
void tpu_qom_init(struct TPU3_tag *tpu, UINT8 channel, UINT8 priority,\
UINT8 mode, UINT8 timebase, UINT8 pin, UINT8 first_match, UINT8 loop, \
UINT8 ref, UINT8 events, union event_tag event[]);
#endif /* ifndef _TPU_QOM_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 + -