I am making a Mobile phone using lpc2148 and a GSM modem SIM900. i have the code for uart1 sending n receiving data. but it does not have interrupt based read function. i want interrupt based uart1 read function. here it is my code.
#include<lpc214x.h> void Uart1Init (void) // Initialize Serial Interface { PINSEL0 |= 0x00050000; //Enable RxD1 and TxD1 U1LCR = 0x83; // 8 bits, no Parity, 1 Stop bit U1DLL = 97; // 9600 Baud Rate @ 15MHz VPB Clock U1LCR = 0x03; // DLAB = 0 } void Uart1PutCh (unsigned char ch) // Write character to Serial Port { U1THR = ch; while (!(U1LSR & 0x20)); } unsigned char Uart1GetCh (void) // Read character from Serial Port { while (!(U1LSR & 0x01)); return (U1RBR); } void Uart1PutS(unsigned char *str) //A function to send a string on UART1 { while(*str) { Uart1PutCh(*str++); } } int main(void) { }