Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: UART3Interrupt.cpp
- Revision:
- 113:db67ae00550e
- Parent:
- 109:a5b8264ffbbc
- Child:
- 114:472502b31a12
diff -r 6ae726539ab9 -r db67ae00550e UART3Interrupt.cpp
--- a/UART3Interrupt.cpp Mon Apr 13 12:16:21 2015 +0000
+++ b/UART3Interrupt.cpp Thu Apr 16 12:57:13 2015 +0000
@@ -1,6 +1,6 @@
#include "UART3Interrupt.h"
-char RXBuffer[__CB_BUFFER_SIZE__];
+char RXBuffer[CB_BUFFER_SIZE];
///< UART3 RX Buffer
volatile uint16_t RX_c = 0;
@@ -11,8 +11,9 @@
// Receive data from UART3 RX
*( RXBuffer + RX_c ) = LPC_UART3 -> RBR;
- if( RXBuffer[ RX_c ] != RXBuffer[ RX_c - 1 ] ){
- // led3 =!led3;
+ if( RXBuffer[ RX_c ] != RXBuffer[ RX_c - 1 ] )
+ {
+ // FIXME remove this if ...
}
RX_c++;
@@ -29,72 +30,4 @@
void RXFrameSync (void) {
RX_c = 0;
status = __WAITING__;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
-void initRX (void) {
-
-RXHeadPtr = IntBuff; // Initial state
-RXHeadPtr = RXTailPtr;
-
-}
-
-void SerialRecvInterrupt (void) // UART3 Serial Interrupt Handler
-{
- static uint8_t data = 0;
- while ( LPC_UART3->LSR &= (0<<1) ) {}
- // *(RXBuffer+idx) = LPC_UART3->RBR; Receive data from UART3 RX
-
- data = LPC_UART3->RBR; // Receive data from UART3 RX
-
- RXHeadPtr = &data;
-
- RXHeadPtr++;
- move++;
-
- if ( RXHeadPtr == (IntBuff+899) )
- {
- RXHeadPtr = IntBuff;
- }
-
-}
-
-void RcvRX( void ) {
-
- static uint16_t p = 0;
- static uint8_t data = 0;
-
- if ( move ) {
-
- data = *RXTailPtr;
-
- RXBuffer[p] = data;
- RXTailPtr++;
- move--;
- p++;
- }
-
- if ( RXTailPtr == (IntBuff+899) ) {
- RXTailPtr = IntBuff;
- }
-
- if ( p == 300 ) {
- processRX = 1;
- p = 0;
- }
-
-}
-*/
\ No newline at end of file
+}
\ No newline at end of file
