UAVX Multicopter Flight Controller.

Dependencies:   mbed

Committer:
gke
Date:
Tue Apr 26 12:12:29 2011 +0000
Revision:
2:90292f8bd179
Parent:
0:62a1c91a859a
Not flightworthy. Posted for others to make use of the I2C SW code.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gke 0:62a1c91a859a 1 /*
gke 0:62a1c91a859a 2 Copyright (c) 2010 Andy Kirkham
gke 0:62a1c91a859a 3
gke 0:62a1c91a859a 4 Permission is hereby granted, free of charge, to any person obtaining a copy
gke 0:62a1c91a859a 5 of this software and associated documentation files (the "Software"), to deal
gke 0:62a1c91a859a 6 in the Software without restriction, including without limitation the rights
gke 0:62a1c91a859a 7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
gke 0:62a1c91a859a 8 copies of the Software, and to permit persons to whom the Software is
gke 0:62a1c91a859a 9 furnished to do so, subject to the following conditions:
gke 0:62a1c91a859a 10
gke 0:62a1c91a859a 11 The above copyright notice and this permission notice shall be included in
gke 0:62a1c91a859a 12 all copies or substantial portions of the Software.
gke 0:62a1c91a859a 13
gke 0:62a1c91a859a 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
gke 0:62a1c91a859a 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
gke 0:62a1c91a859a 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
gke 0:62a1c91a859a 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
gke 0:62a1c91a859a 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
gke 0:62a1c91a859a 19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
gke 0:62a1c91a859a 20 THE SOFTWARE.
gke 0:62a1c91a859a 21 */
gke 0:62a1c91a859a 22
gke 0:62a1c91a859a 23 #ifndef SB_GLOBALS_G
gke 0:62a1c91a859a 24 #define SB_GLOBALS_G
gke 0:62a1c91a859a 25
gke 0:62a1c91a859a 26 #define SERIALBUFFERED_BUFFER_SIZE 256
gke 0:62a1c91a859a 27
gke 0:62a1c91a859a 28 #define SET_REGISTER(reg, val) *(uint32_t *)(uart_base+reg)=val
gke 0:62a1c91a859a 29 #define GET_REGISTER(reg) *(uint32_t *)(uart_base+reg)
gke 0:62a1c91a859a 30
gke 0:62a1c91a859a 31 #define SERIALBUFFERED_RBR 0x00
gke 0:62a1c91a859a 32 #define SERIALBUFFERED_THR 0x00
gke 0:62a1c91a859a 33 #define SERIALBUFFERED_DLL 0x00
gke 0:62a1c91a859a 34 #define SERIALBUFFERED_IER 0x04
gke 0:62a1c91a859a 35 #define SERIALBUFFERED_DML 0x04
gke 0:62a1c91a859a 36 #define SERIALBUFFERED_IIR 0x08
gke 0:62a1c91a859a 37 #define SERIALBUFFERED_FCR 0x08
gke 0:62a1c91a859a 38 #define SERIALBUFFERED_LCR 0x0C
gke 0:62a1c91a859a 39 #define SERIALBUFFERED_LSR 0x14
gke 0:62a1c91a859a 40 #define SERIALBUFFERED_SCR 0x1C
gke 0:62a1c91a859a 41 #define SERIALBUFFERED_ACR 0x20
gke 0:62a1c91a859a 42 #define SERIALBUFFERED_ICR 0x24
gke 0:62a1c91a859a 43 #define SERIALBUFFERED_FDR 0x28
gke 0:62a1c91a859a 44 #define SERIALBUFFERED_TER 0x30
gke 0:62a1c91a859a 45
gke 0:62a1c91a859a 46 extern char *_tx_buffer[4];
gke 0:62a1c91a859a 47 extern int _tx_buffer_size[4];
gke 0:62a1c91a859a 48 extern int _tx_buffer_in[4];
gke 0:62a1c91a859a 49 extern int _tx_buffer_out[4];
gke 0:62a1c91a859a 50 extern bool _tx_buffer_full[4];
gke 0:62a1c91a859a 51 extern bool _tx_buffer_overflow[4];
gke 0:62a1c91a859a 52 extern bool _tx_buffer_used_malloc[4];
gke 0:62a1c91a859a 53
gke 0:62a1c91a859a 54 extern char *_rx_buffer[4];
gke 0:62a1c91a859a 55 extern int _rx_buffer_size[4];
gke 0:62a1c91a859a 56 extern int _rx_buffer_in[4];
gke 0:62a1c91a859a 57 extern int _rx_buffer_out[4];
gke 0:62a1c91a859a 58 extern bool _rx_buffer_full[4];
gke 0:62a1c91a859a 59 extern bool _rx_buffer_overflow[4];
gke 0:62a1c91a859a 60 extern bool _rx_buffer_used_malloc[4];
gke 0:62a1c91a859a 61
gke 0:62a1c91a859a 62 #endif