| Line No. | Rev | Author | Line |
|---|---|---|---|
| 1 | 32 | kaklik | /********************************************************************* |
| 2 | * |
||
| 3 | * UART access routines for C18 and C30 |
||
| 4 | * |
||
| 5 | ********************************************************************* |
||
| 6 | * FileName: UART.h |
||
| 7 | * Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32 |
||
| 8 | * Compiler: Microchip C32 v1.05 or higher |
||
| 9 | * Microchip C30 v3.12 or higher |
||
| 10 | * Microchip C18 v3.30 or higher |
||
| 11 | * HI-TECH PICC-18 PRO 9.63PL2 or higher |
||
| 12 | * Company: Microchip Technology, Inc. |
||
| 13 | * |
||
| 14 | * Software License Agreement |
||
| 15 | * |
||
| 16 | * Copyright (C) 2002-2009 Microchip Technology Inc. All rights |
||
| 17 | * reserved. |
||
| 18 | * |
||
| 19 | * Microchip licenses to you the right to use, modify, copy, and |
||
| 20 | * distribute: |
||
| 21 | * (i) the Software when embedded on a Microchip microcontroller or |
||
| 22 | * digital signal controller product ("Device") which is |
||
| 23 | * integrated into Licensee's product; or |
||
| 24 | * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h, |
||
| 25 | * ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device |
||
| 26 | * used in conjunction with a Microchip ethernet controller for |
||
| 27 | * the sole purpose of interfacing with the ethernet controller. |
||
| 28 | * |
||
| 29 | * You should refer to the license agreement accompanying this |
||
| 30 | * Software for additional information regarding your rights and |
||
| 31 | * obligations. |
||
| 32 | * |
||
| 33 | * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT |
||
| 34 | * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT |
||
| 35 | * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A |
||
| 36 | * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
||
| 37 | * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR |
||
| 38 | * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF |
||
| 39 | * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS |
||
| 40 | * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE |
||
| 41 | * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER |
||
| 42 | * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT |
||
| 43 | * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. |
||
| 44 | * |
||
| 45 | * |
||
| 46 | * Author Date Comment |
||
| 47 | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
||
| 48 | * Howard Schlunder 6/16/06 Original |
||
| 49 | ********************************************************************/ |
||
| 50 | #ifndef __UART_H |
||
| 51 | #define __UART_H |
||
| 52 | |||
| 53 | #include "Compiler.h" |
||
| 54 | #include "HardwareProfile.h" |
||
| 55 | |||
| 56 | |||
| 57 | #if defined(__18CXX) // PIC18 |
||
| 58 | char BusyUSART(void); |
||
| 59 | void CloseUSART(void); |
||
| 60 | char DataRdyUSART(void); |
||
| 61 | char ReadUSART(void); |
||
| 62 | void WriteUSART(char data); |
||
| 63 | void getsUSART(char *buffer, unsigned char len); |
||
| 64 | void putsUSART(char *data); |
||
| 65 | void putrsUSART(const rom char *data); |
||
| 66 | #elif defined(__C30__) // PIC24F, PIC24H, dsPIC30, dsPIC33 |
||
| 67 | void putsUART2(unsigned int *buffer); |
||
| 68 | #define putrsUART2(x) putsUART2( (unsigned int *)x) |
||
| 69 | unsigned int getsUART2(unsigned int length,unsigned int *buffer, |
||
| 70 | unsigned int uart_data_wait); |
||
| 71 | char DataRdyUART2(void); |
||
| 72 | char BusyUART2(void); |
||
| 73 | unsigned int ReadUART2(void); |
||
| 74 | void WriteUART2(unsigned int data); |
||
| 75 | #elif defined( __PIC32MX__ ) |
||
| 76 | #define putrsUART2(x) putsUART2(x) |
||
| 77 | #endif |
||
| 78 | |||
| 79 | |||
| 80 | #endif |
Powered by WebSVN v2.8.3