f53x_linsnooper_main.h

来自「8051试验程序 基础教材」· C头文件 代码 · 共 96 行

H
96
字号
//-----------------------------------------------------------------------------
// F53x_LINSnooper_Main.h
//-----------------------------------------------------------------------------
// Copyright 2006 Silicon Laboratories, Inc.
// http://www.silabs.com
//
// File Description:
//
// Header file with function prototypes relevant to main_SnifferLIN.c
//
// FID:
// Target:          C8051F53x
// Tool chain:      KEIL C51 7.20
// Command Line:    None
// Project Name:    LIN Snooper
//
// Release 1.0
//    -Initial Revision
//    -01 NOV 2006
//
//

//-----------------------------------------------------------------------------
// Header File Preprocessor Directive
//-----------------------------------------------------------------------------
#ifndef __MAIN_H__
#define __MAIN_H__


//-----------------------------------------------------------------------------
// Constant Definitions
//-----------------------------------------------------------------------------
#define SYSCLK  24500000L               // System clock in Hz

#define LINLENGTH   8                   // Length of LIN Data bytes
#define LIN_BUFFER_SIZE 32              // Size of LIN_BUFFER
#define UART_BUFFER_SIZE    10          // Size of UART_BUFFER

#define UART_RECEIVE    0x01            // mask
#define UART_TRANSMIT   0x02            // mask

#define LED     0x08                    // LED mask (connected to P1.3)
#define SWITCH  0x10                    // Switch mask (connected to P1.4)
#define T0DEBUG 0x20                    //  mask (P1.5)
#define T1DEBUG 0x40                    //  mask (P1.6)

#define ulong   unsigned long
#define uint    unsigned int
#define uint8   unsigned char
#define uchar   unsigned char

// MACRO Definitions

//-----------------------------------------------------------------------------
// MACRO:          ENABLE_IRQ
// Parameters:     NONE
// Definition:     Macro that enables IRQ
// Obs:
//-----------------------------------------------------------------------------
#define ENABLE_IRQ  IE |= 0x80

//-----------------------------------------------------------------------------
// MACRO:          DISABLE_IRQ
// Parameters:     NONE
// Definition:     Macro that disables IRQ
// Obs:
//-----------------------------------------------------------------------------
#define DISABLE_IRQ IE &= ~0x80


//-----------------------------------------------------------------------------
// Function Prototypes
//-----------------------------------------------------------------------------
#ifdef  F53x_MAIN_SOURCE

void CPU_Initialize(void);
void Display_Identifier(void);
void Display_Received_Data(void);
void Display_Sniffer_Status(void);
void Analize_Received_Data(void);
void Display_Flash_Data(void);
#else
extern void CPU_Initialize(void);
extern void Display_Identifier(void);
extern void Display_Received_Data(void);
extern void Display_Sniffer_Status(void);
extern void Analize_Received_Data(void);
extern void Display_Flash_Data(void);
#endif                                      // endif definition of F53x_MAIN_SOURCE

#endif                                      // endif definition of __MAIN_H__

//-----------------------------------------------------------------------------
// End Of File
//-----------------------------------------------------------------------------

⌨️ 快捷键说明

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