📄 counter8_uart.h
字号:
//*****************************************************************************
//*****************************************************************************
// FILENAME: Counter8_UART.h
// Version: 2.5, Updated on 2008/12/13 at 10:55:38
// Generated by PSoC Designer ???
//
// DESCRIPTION: Counter8 User Module C Language interface file
// for the 22/24/27/29xxx PSoC family of devices
//-----------------------------------------------------------------------------
// Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************
#include <m8c.h>
#pragma fastcall16 Counter8_UART_EnableInt
#pragma fastcall16 Counter8_UART_DisableInt
#pragma fastcall16 Counter8_UART_Start
#pragma fastcall16 Counter8_UART_Stop
#pragma fastcall16 Counter8_UART_bReadCounter // Read DR0
#pragma fastcall16 Counter8_UART_WritePeriod // Write DR1
#pragma fastcall16 Counter8_UART_bReadCompareValue // Read DR2
#pragma fastcall16 Counter8_UART_WriteCompareValue // Write DR2
// The following symbols are deprecated.
// They may be omitted in future releases
//
#pragma fastcall16 bCounter8_UART_ReadCounter // Read DR0 (Deprecated)
#pragma fastcall16 bCounter8_UART_ReadCompareValue // Read DR2 (Deprecated)
//-------------------------------------------------
// Prototypes of the Counter8_UART API.
//-------------------------------------------------
extern void Counter8_UART_EnableInt(void); // Proxy Class 1
extern void Counter8_UART_DisableInt(void); // Proxy Class 1
extern void Counter8_UART_Start(void); // Proxy Class 1
extern void Counter8_UART_Stop(void); // Proxy Class 1
extern BYTE Counter8_UART_bReadCounter(void); // Proxy Class 1
extern void Counter8_UART_WritePeriod(BYTE bPeriod); // Proxy Class 1
extern BYTE Counter8_UART_bReadCompareValue(void); // Proxy Class 2
extern void Counter8_UART_WriteCompareValue(BYTE bCompareValue); // Proxy Class 1
// The following functions are deprecated.
// They may be omitted in future releases
//
extern BYTE bCounter8_UART_ReadCounter(void); // Deprecated
extern BYTE bCounter8_UART_ReadCompareValue(void); // Deprecated
//--------------------------------------------------
// Constants for Counter8_UART API's.
//--------------------------------------------------
#define Counter8_UART_CONTROL_REG_START_BIT ( 0x01 )
#define Counter8_UART_INT_REG_ADDR ( 0x0e1 )
#define Counter8_UART_INT_MASK ( 0x20 )
//--------------------------------------------------
// Constants for Counter8_UART user defined values
//--------------------------------------------------
#define Counter8_UART_PERIOD ( 0x09 )
#define Counter8_UART_COMPARE_VALUE ( 0x05 )
//-------------------------------------------------
// Register Addresses for Counter8_UART
//-------------------------------------------------
#pragma ioport Counter8_UART_COUNTER_REG: 0x034 //DR0 Count register
BYTE Counter8_UART_COUNTER_REG;
#pragma ioport Counter8_UART_PERIOD_REG: 0x035 //DR1 Period register
BYTE Counter8_UART_PERIOD_REG;
#pragma ioport Counter8_UART_COMPARE_REG: 0x036 //DR2 Compare register
BYTE Counter8_UART_COMPARE_REG;
#pragma ioport Counter8_UART_CONTROL_REG: 0x037 //Control register
BYTE Counter8_UART_CONTROL_REG;
#pragma ioport Counter8_UART_FUNC_REG: 0x134 //Function register
BYTE Counter8_UART_FUNC_REG;
#pragma ioport Counter8_UART_INPUT_REG: 0x135 //Input register
BYTE Counter8_UART_INPUT_REG;
#pragma ioport Counter8_UART_OUTPUT_REG: 0x136 //Output register
BYTE Counter8_UART_OUTPUT_REG;
#pragma ioport Counter8_UART_INT_REG: 0x0e1 //Interrupt Mask Register
BYTE Counter8_UART_INT_REG;
//-------------------------------------------------
// Counter8_UART Macro 'Functions'
//-------------------------------------------------
#define Counter8_UART_Start_M \
Counter8_UART_CONTROL_REG |= Counter8_UART_CONTROL_REG_START_BIT
#define Counter8_UART_Stop_M \
Counter8_UART_CONTROL_REG &= ~Counter8_UART_CONTROL_REG_START_BIT
#define Counter8_UART_EnableInt_M \
M8C_EnableIntMask(Counter8_UART_INT_REG, Counter8_UART_INT_MASK)
#define Counter8_UART_DisableInt_M \
M8C_DisableIntMask(Counter8_UART_INT_REG, Counter8_UART_INT_MASK)
// end of file Counter8_UART.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -