Simple mbed library with macros
Dependents: SimpleTimer SimpleUART SimpleTimer Stoppuhr1
Diff: serial.h
- Revision:
- 12:e9f331a5c932
- Parent:
- 11:20e2539b6c2b
- Child:
- 13:89420fa6f561
--- a/serial.h Sat Nov 13 23:00:24 2010 +0000 +++ b/serial.h Sat Nov 13 23:07:44 2010 +0000 @@ -132,7 +132,7 @@ #define SERIAL_ENABLE_INTERRUPT(value) UART_BASE->IER = value; \ ENABLE_INTERRUPT(TOKENPASTE2(UART_NUMBER,_IRQn)); -inline void SERIAL_INIT() +__INLINE void SERIAL_INIT() { // Enable UARTn SET_BIT_VALUE(LPC_SC->PCONP, TOKENPASTE2(UART_NUMBER,_PCONP_BIT) , 1); @@ -148,7 +148,7 @@ } // See 14.4.5 p303 -inline int SERIAL_CHECK_INTERRUPT(void) { +__INLINE int SERIAL_CHECK_INTERRUPT(void) { uint32_t serialStatus = UART_BASE->IIR; if (serialStatus & 1) // IntStatus, 1 = No Interrupt is pending. @@ -161,7 +161,7 @@ return 1; } -inline void SERIAL_SETBAUD(unsigned int baud) { +__INLINE void SERIAL_SETBAUD(unsigned int baud) { // Peripheral Clock Selection register bit values (See Table 42, p57) uint16_t divisorValue = (SystemCoreClock / 16 / baud); #if 0