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

📄 serial.h

📁 nec 78K0 样例对程序初始化电表样
💻 H
字号:
/*
*******************************************************************************
**
**  This device driver was created by Applilet for the 78K0/KB2, 78K0/KC2,
**  78K0/KD2, 78K0/KE2 and 78K0/KF2 8-Bit Single-Chip Microcontrollers.
**
**  Copyright(C) NEC Electronics Corporation 2002 - 2005
**  All rights reserved by NEC Electronics Corporation.
**
**  This program should be used on your own responsibility.
**  NEC Electronics Corporation assumes no responsibility for any losses
**  incurred by customers or third parties arising from the use of this file.
**
**  Filename :	serial.h
**  Abstract :	This file implements device driver for SERIAL module.
**  APIlib :	NEC78K0KX2.lib V1.01 [09 Aug. 2005]
**
**  Device :	uPD78F0513(44-pin)
**
**  Compiler :	NEC/CC78K0
**
*******************************************************************************
*/
#ifndef _MDSERIAL_
#define _MDSERIAL_
/*
*******************************************************************************
**  Global variables
*******************************************************************************
*/
#define	UART_BAUDRATE_M0	0x3
#define	UART_BAUDRATE_K0	0x1a
#define	UART_BAUDRATE_M6	0x4
#define	UART_BAUDRATE_K6	0xd0
#define	IIC0_SLAVEADDRESS	0x0

void UART0_Init( void );
MD_STATUS UART0_SendData( UCHAR* txbuf, UCHAR txnum );
MD_STATUS UART0_ReceiveData( UCHAR* rxbuf, UCHAR rxnum );
__interrupt void MD_INTSR0( void );
__interrupt void MD_INTST0( void );
void UART6_Init( void );
MD_STATUS UART6_SendData( UCHAR* txbuf, UCHAR txnum );
MD_STATUS UART6_ReceiveData( UCHAR* rxbuf, UCHAR rxnum );
__interrupt void MD_INTSR6( void );
__interrupt void MD_INTST6( void );

enum TransferMode { Send, Receive };
__interrupt void MD_INTIIC0( void ) ;
MD_STATUS IIC0_SlaveHandler( void );
MD_STATUS IIC0_MasterHandler( void );
void CALL_IIC0_SlaveAddressMatch( void );
void CALL_IIC0_MasterFindSlave( void );

#endif

⌨️ 快捷键说明

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