VZTECH / Mbed 2 deprecated main_src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers UART3Interrupt.cpp Source File

UART3Interrupt.cpp

00001 #include "UART3Interrupt.h"
00002 
00003 char RXBuffer [ CB_BUFFER_SIZE ];
00004 ///< UART3 RX Buffer
00005 
00006 volatile uint16_t RX_c = 0;   
00007 
00008 ///< UART3 Serial Interrupt Handler
00009 void SerialRecvInterrupt( void ){
00010     while ( LPC_UART3 -> LSR & ( 0<<1 ) ) {}
00011     // Receive data from UART3 RX
00012     *( RXBuffer + RX_c ) = LPC_UART3 -> RBR;
00013     
00014     RX_c++;
00015     
00016     led4 =!led4;
00017     
00018     if ( RX_c == 300 ){ 
00019         status = READ;
00020         missed_pkg++;
00021         cpld_pkg_rx_counter++;
00022     }
00023 }
00024 
00025 void RXFrameSync (void) {
00026     RX_c = 0;
00027     status = WAITING;
00028 }