uart.h
Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (c) 2011, Ascending Technologies GmbH
00004 All rights reserved.
00005 
00006 Redistribution and use in source and binary forms, with or without
00007 modification, are permitted provided that the following conditions are met:
00008 
00009  * Redistributions of source code must retain the above copyright notice,
00010    this list of conditions and the following disclaimer.
00011  * Redistributions in binary form must reproduce the above copyright
00012    notice, this list of conditions and the following disclaimer in the
00013    documentation and/or other materials provided with the distribution.
00014 
00015 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
00016 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00017 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00018 DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
00019 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00020 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00021 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00022 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00023 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00024 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00025 DAMAGE.
00026 
00027  */
00028 
00029 #ifndef __UART_H
00030 #define __UART_H
00031 
00032 extern void UARTInitialize(unsigned int);
00033 extern void UART1Initialize(unsigned int baud);
00034 extern void UARTWriteChar(unsigned char);
00035 extern void UART1WriteChar(unsigned char);
00036 extern unsigned char UARTReadChar(void);
00037 extern unsigned char UART1ReadChar(void);
00038 extern void __putchar(int);
00039 extern void UART_send(char *, unsigned char);
00040 extern void UART1_send(unsigned char *, unsigned char);
00041 extern void mdv_output(unsigned int);
00042 extern void UART_send_ringbuffer(void);
00043 extern void UART1_send_ringbuffer(void);
00044 extern int ringbuffer(unsigned char, unsigned char*, unsigned int);
00045 extern int ringbuffer1(unsigned char, unsigned char*, unsigned int);
00046 extern void uart0ISR(void);
00047 extern void uart1ISR(void);
00048 extern void UART_SendPacket(void *, unsigned short, unsigned char);
00049 extern void check_chksum(void);
00050 extern void GPS_configure(void);
00051 
00052 extern unsigned char send_buffer[16];
00053 extern unsigned short crc16(void *, unsigned short);
00054 extern unsigned short crc_update (unsigned short, unsigned char);
00055 extern unsigned char chksum_trigger;
00056 extern unsigned char UART_CalibDoneFlag;
00057 extern unsigned char trigger_transmission;
00058 extern unsigned char transmission_running;
00059 
00060 #define RBREAD 0
00061 #define RBWRITE 1
00062 #define RBFREE  2 
00063 #define RINGBUFFERSIZE  384
00064 
00065 #define RX_IDLE 0
00066 #define RX_ACTSYNC1 1
00067 #define RX_ACTSYNC2 2
00068 #define RX_ACTDATA 3
00069 #define RX_ACTCHKSUM 4
00070 
00071 #define GPSCONF_TIMEOUT 200
00072 
00073 #endif //__UART_H
00074 


asctec_hl_firmware
Author(s): Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
autogenerated on Tue Jan 7 2014 11:05:19