Only imu output

Dependencies:   Servo mbed

Fork of FYDP_Final2 by Mark Vandermeulen

Committer:
tntmarket
Date:
Wed Mar 25 09:58:50 2015 +0000
Revision:
5:d2e955a94940
Parent:
0:21019d94ad33
only imu output

Who changed what in which revision?

UserRevisionLine numberNew contents of line
majik 0:21019d94ad33 1 /* $Id:$
majik 0:21019d94ad33 2 1.32 12th October 2013
majik 0:21019d94ad33 3 * Improved claim documentation: http://mbed.org/questions/1817/Redirect-stdout-via-MODSERIAL-is-this-po/ by http://mbed.org/users/WiredHome/
majik 0:21019d94ad33 4
majik 0:21019d94ad33 5 1.31 11th October 2013
majik 0:21019d94ad33 6 * Added claim function to redirect for example stdout
majik 0:21019d94ad33 7
majik 0:21019d94ad33 8 1.30 1st September 2013
majik 0:21019d94ad33 9 * Removed all DMA related code (not supported in this version currently)
majik 0:21019d94ad33 10 * Minor bug fix
majik 0:21019d94ad33 11
majik 0:21019d94ad33 12 1.29 12th July 2013
majik 0:21019d94ad33 13 * Added KL25Z support + split code in device dependent and independent part
majik 0:21019d94ad33 14
majik 0:21019d94ad33 15 1.26 10th June 2013
majik 0:21019d94ad33 16 * _uidx reference in DMA code replaced by _serial.index
majik 0:21019d94ad33 17
majik 0:21019d94ad33 18 1.25 8th January 2013
majik 0:21019d94ad33 19
majik 0:21019d94ad33 20 * Bring back into line with MBed libraries.
majik 0:21019d94ad33 21 * Credits:
majik 0:21019d94ad33 22 Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/3ba4341d74d6
majik 0:21019d94ad33 23 Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/a469aa702bab
majik 0:21019d94ad33 24
majik 0:21019d94ad33 25
majik 0:21019d94ad33 26 1.24 6th Dec 2012
majik 0:21019d94ad33 27
majik 0:21019d94ad33 28 * Beta release for new Mbed library.
majik 0:21019d94ad33 29
majik 0:21019d94ad33 30 1.23 25th July 2012
majik 0:21019d94ad33 31
majik 0:21019d94ad33 32 * LPC1768 code as was. This release includes "alpha" support for the LPC11U24
majik 0:21019d94ad33 33
majik 0:21019d94ad33 34 1.22 19th April 2012
majik 0:21019d94ad33 35
majik 0:21019d94ad33 36 * http://mbed.org/forum/bugs-suggestions/topic/2936/
majik 0:21019d94ad33 37 * Bug fix, protect important buffer pointers from IRQ corruption.
majik 0:21019d94ad33 38 * Credits:
majik 0:21019d94ad33 39 Anthony Wieser http://mbed.org/users/WieserSoftwareLtd/ for the fix.
majik 0:21019d94ad33 40 BlazeX http://mbed.org/users/BlazeX/ for the alert that a fix was needed!
majik 0:21019d94ad33 41
majik 0:21019d94ad33 42 1.21 10 May 2011
majik 0:21019d94ad33 43
majik 0:21019d94ad33 44 * http://mbed.org/forum/mbed/topic/2264
majik 0:21019d94ad33 45
majik 0:21019d94ad33 46 1.20 26 April 2011
majik 0:21019d94ad33 47
majik 0:21019d94ad33 48 * Bug fix, not blocking on transmit
majik 0:21019d94ad33 49 by Erik Petrich, http://mbed.org/forum/bugs-suggestions/topic/2200
majik 0:21019d94ad33 50
majik 0:21019d94ad33 51 1.19 20 April 2011
majik 0:21019d94ad33 52
majik 0:21019d94ad33 53 * Fixed some doxygen comment bugs.
majik 0:21019d94ad33 54
majik 0:21019d94ad33 55 1.18 20 April 2011
majik 0:21019d94ad33 56
majik 0:21019d94ad33 57 * All callbacks now use MODSERIAL_callback (rather than Mbed's FunctionPointer[1] type)
majik 0:21019d94ad33 58 to store and invoke it's callbacks. This allows MODSERIAL to pass a parameter
majik 0:21019d94ad33 59 to callbacks. The function prototype is now void func(MODSERIAL_IRQ_INFO *q).
majik 0:21019d94ad33 60 * Callbacks now pass a pointer to a MODSERIAL_IRQ_INFO class type.
majik 0:21019d94ad33 61 This class holds a pointer to the MODSERIAL object that invoked the callback
majik 0:21019d94ad33 62 thus freeing callbacks need to use the global variable of the original
majik 0:21019d94ad33 63 MODSERIAL instance.
majik 0:21019d94ad33 64 * MODSERIAL_IRQ_INFO also declares public functions that are protected within MODSERIAL
majik 0:21019d94ad33 65 thus allowing certain functions to be restricted to callback context only.
majik 0:21019d94ad33 66 * New function MODSERIAL_IRQ_INFO::rxDiscardLastChar() allows an rxCallback function
majik 0:21019d94ad33 67 to remove the character that was just placed into the RX buffer.
majik 0:21019d94ad33 68
majik 0:21019d94ad33 69 [1] http://mbed.org/users/AjK/libraries/FPointer/latest/docs/
majik 0:21019d94ad33 70
majik 0:21019d94ad33 71 1.17 08/Mar/2011
majik 0:21019d94ad33 72 Fixed a memory leak in the DMA code.
majik 0:21019d94ad33 73
majik 0:21019d94ad33 74 1.16 - 12 Feb 2011
majik 0:21019d94ad33 75
majik 0:21019d94ad33 76 * Missed one, doh!
majik 0:21019d94ad33 77
majik 0:21019d94ad33 78 1.15 - 12 Feb 2011
majik 0:21019d94ad33 79
majik 0:21019d94ad33 80 * Fixed some typos.
majik 0:21019d94ad33 81
majik 0:21019d94ad33 82 1.14 - 7 Feb 2011
majik 0:21019d94ad33 83
majik 0:21019d94ad33 84 * Fixed a bug in __putc() that caused the output buffer pointer to
majik 0:21019d94ad33 85 become corrupted.
majik 0:21019d94ad33 86
majik 0:21019d94ad33 87 1.13 - 20/01/2011
majik 0:21019d94ad33 88
majik 0:21019d94ad33 89 * Added extra documentation.
majik 0:21019d94ad33 90 * Fixed some typos.
majik 0:21019d94ad33 91
majik 0:21019d94ad33 92 1.12 - 20/01/2011
majik 0:21019d94ad33 93
majik 0:21019d94ad33 94 * Added new "autoDetectChar()" function. To use:-
majik 0:21019d94ad33 95 1st: Add a callback to invoke when the char is detected:-
majik 0:21019d94ad33 96 .attach(&detectedChar, MODSERIAL::RxAutoDetect);
majik 0:21019d94ad33 97 2nd: Send the char to detect.
majik 0:21019d94ad33 98 .autoDectectChar('\n');
majik 0:21019d94ad33 99 Whenever that char goes into the RX buffer your callback will be invoked.
majik 0:21019d94ad33 100 Added example2.cpp to demo a simple messaging system using this auto feature.
majik 0:21019d94ad33 101
majik 0:21019d94ad33 102
majik 0:21019d94ad33 103 1.11 - 23/11/2010
majik 0:21019d94ad33 104
majik 0:21019d94ad33 105 * Fixed a minor issue with 1.10 missed an alteration of name change.
majik 0:21019d94ad33 106
majik 0:21019d94ad33 107 1.10 - 23/11/2010
majik 0:21019d94ad33 108
majik 0:21019d94ad33 109 * Rename the DMA callback from attach_dma_complete() to attach_dmaSendComplete()
majik 0:21019d94ad33 110
majik 0:21019d94ad33 111 1.9 - 23/11/2010
majik 0:21019d94ad33 112
majik 0:21019d94ad33 113 * Added support for DMA sending of characters. Required is
majik 0:21019d94ad33 114 the MODDMA library module:-
majik 0:21019d94ad33 115 http://mbed.org/users/AjK/libraries/MODDMA/latest
majik 0:21019d94ad33 116 See example_dma.cpp for more information.
majik 0:21019d94ad33 117
majik 0:21019d94ad33 118 1.8 - 22/11/2010
majik 0:21019d94ad33 119
majik 0:21019d94ad33 120 * Added code so that if a buffer is set to zero length then
majik 0:21019d94ad33 121 MODSERIAL defaults to just using the FIFO for that stream
majik 0:21019d94ad33 122 thus making the library "fall back" to teh same operation
majik 0:21019d94ad33 123 that the Mbed Serial library performs.
majik 0:21019d94ad33 124 * Removed dmaSend() function that should have been removed
majik 0:21019d94ad33 125 at 1.7
majik 0:21019d94ad33 126
majik 0:21019d94ad33 127 1.7 - 21/11/2010
majik 0:21019d94ad33 128
majik 0:21019d94ad33 129 * Remove the DMA enum from MODSERIAL.h as it's not currently
majik 0:21019d94ad33 130 ready for release.
majik 0:21019d94ad33 131 * Added page doxygen comments.
majik 0:21019d94ad33 132
majik 0:21019d94ad33 133 1.6 - 21/11/2010
majik 0:21019d94ad33 134
majik 0:21019d94ad33 135 * Version 1.5 solved a blocking problem on putc() when called
majik 0:21019d94ad33 136 from another ISR. However, isr_tx() invokes a callback of it's
majik 0:21019d94ad33 137 own when a byte is tranferred from TX buffer to TX FIFO. User
majik 0:21019d94ad33 138 programs may interpret that as an IRQ callback. That's an ISR
majik 0:21019d94ad33 139 call from within an existing ISR which is not good. So the
majik 0:21019d94ad33 140 TxIrq callback from isr_tx is now conditional. It will only
majik 0:21019d94ad33 141 be called when isr_tx() is actually within it's own ISR and
majik 0:21019d94ad33 142 not when called from alternate ISR handlers.
majik 0:21019d94ad33 143
majik 0:21019d94ad33 144 1.5 - 21/11/2010
majik 0:21019d94ad33 145
majik 0:21019d94ad33 146 * Calling putc() (or any derived function that uses it like
majik 0:21019d94ad33 147 printf()) while inside an interrupt service routine can
majik 0:21019d94ad33 148 cause the system to lock up if the TX buffer is full. This
majik 0:21019d94ad33 149 is because bytes are only transferred from the TX buffer to
majik 0:21019d94ad33 150 the TX FIFO via the TX ISR. If we are, say in an RX ISR already,
majik 0:21019d94ad33 151 then the TX ISR will never trigger. The TX buffer stays full and
majik 0:21019d94ad33 152 there is never space to putc() the byte. So, while putc() blocks
majik 0:21019d94ad33 153 waiting for space it calls isr_tx() to ensure if TX FIFO space
majik 0:21019d94ad33 154 becomes available it will move bytes from the TX buffer to TX
majik 0:21019d94ad33 155 FIFO thus removing the blocking condition within putc().
majik 0:21019d94ad33 156
majik 0:21019d94ad33 157 1.4 - 21/11/2010
majik 0:21019d94ad33 158
majik 0:21019d94ad33 159 * Removed all the new DMA code. I wish mbed.org had proper SVN
majik 0:21019d94ad33 160 versioning, I'm use to working in HEAD and BRANCHES after I've
majik 0:21019d94ad33 161 released a project. Getting bug reports in current releases
majik 0:21019d94ad33 162 while trying to dev new code is hard to manage without source
majik 0:21019d94ad33 163 control of some type!
majik 0:21019d94ad33 164
majik 0:21019d94ad33 165 1.3 - 21/11/2010
majik 0:21019d94ad33 166
majik 0:21019d94ad33 167 * Fixed a macro problem with txIsBusy()
majik 0:21019d94ad33 168 * Started adding code to use "block data" sending using DMA
majik 0:21019d94ad33 169 * Removed #include "IOMACROS.h"
majik 0:21019d94ad33 170
majik 0:21019d94ad33 171 1.2 - 21/11/2010
majik 0:21019d94ad33 172
majik 0:21019d94ad33 173 * Removed unsed variables from flushBuffer()
majik 0:21019d94ad33 174 * Fixed a bug where both RX AND TX fifos are cleared/reset
majik 0:21019d94ad33 175 when just TX OR RX should be cleared.
majik 0:21019d94ad33 176 * Fixed a bug that cleared IIR when in fact it should be left
majik 0:21019d94ad33 177 alone so that any pending interrupt after flush is handled.
majik 0:21019d94ad33 178 * Merged setBase() into init() as it wasn't required anywhere else.
majik 0:21019d94ad33 179 * Changed init() to enforce _uidx is set by Serial to define the _base
majik 0:21019d94ad33 180 address of the Uart in use.
majik 0:21019d94ad33 181
majik 0:21019d94ad33 182 1.1 - 20/11/2010
majik 0:21019d94ad33 183
majik 0:21019d94ad33 184 * Added this file
majik 0:21019d94ad33 185 * Removed cruft from GETC.cpp
majik 0:21019d94ad33 186 * "teh" should be "the", why do my fingers do that?
majik 0:21019d94ad33 187
majik 0:21019d94ad33 188 1.0 - 20/11/2010
majik 0:21019d94ad33 189
majik 0:21019d94ad33 190 * First release.
majik 0:21019d94ad33 191
majik 0:21019d94ad33 192 */