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

📄 uartintc.h

📁 reading gps data from serial
💻 H
字号:
/*********************************************************************
 *
 *   This file implements the library functionality of UART.
 *   It adds Transmit and receive functionality , circular buffer and 
 *	 interrupt functionality.
 *   
 *********************************************************************
 * FileName:        UARTIntC.h
 * Dependencies:    UARTIntC.def
 * Processor:       PIC18XXX
 * Compiler:		MCC18
 * Assembler:       MPASMWIN 03.20.07
 * Linker:          MPLINK 3.20
 * Company:         Microchip Technology, Inc.
 *
 * Software License Agreement
 *
 * The software supplied herewith by Microchip Technology Incorporated
 * (the "Company") is intended and supplied to you, the Company抯
 * customer, for use solely and exclusively with products manufactured
 * by the Company. 
 *
 * The software is owned by the Company and/or its supplier, and is 
 * protected under applicable copyright laws. All rights are reserved. 
 * Any use in violation of the foregoing restrictions may subject the 
 * user to criminal sanctions under applicable laws, as well as to 
 * civil liability for the breach of the terms and conditions of this 
 * license.
 
 * THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES, 
 * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED 
 * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
 * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, 
 * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR 
 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
 *
 *
 *
 *
 * Author               Date        Comment
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Reddy TE			Sept. 19,2003		Original Release
 * 
 * Reddy TE			Sept. 24,2003		Changed return values of func-
 *										tions to unsigned char
 ********************************************************************/


#ifndef _UARTIntC_H
#define	_UARTIntC_H

#include "UARTIntC.def"


/* Constants found in .def file are given readable names*/
#define TX_BUFFER_SIZE UARTINTC_TX_BUFFER_SIZE
#define RX_BUFFER_SIZE UARTINTC_RX_BUFFER_SIZE

#ifdef UARTINTC_TXON
  #define TXON 1
#elif UARTINTC_TXOFF
  #define TXON 0
#endif

#ifdef UARTINTC_RXON
  #define RXON 1
#elif UARTINTC_RXOFF
  #define RXON 0
#endif

#define TXON_AND_RXON ((TXON) & (RXON))
#define	TXOFF_AND_RXON ((!(TXON)) & (RXON))


// User can change the following values and accordingly
// the ISR location in the main application.
//   Can they be MPAM module parameters?		
#define BRGH_VAL 1
#define	TX_PRIORITY_ON	0
#define	RX_PRIORITY_ON	0

// More error check to be done and the following
// code can be modified.
// If SPBRG is out of range, it won't let the 
// main application be compiled and linked.
#define SPBRG_V1  (UART_CLOCK_FREQ / UARTINTC_BAUDRATE)
#define SPBRG_V2  SPBRG_V1/64
//#define SPBRG_VAL  (SPBRG_V2 - 1) // baudrate yanl

⌨️ 快捷键说明

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