Simple mbed library with macros

Dependents:   SimpleTimer SimpleUART SimpleTimer Stoppuhr1

Files at this revision

API Documentation at this revision

Comitter:
Alkorin
Date:
Sat Nov 13 23:12:06 2010 +0000
Parent:
12:e9f331a5c932
Child:
14:23c6d41cb377
Commit message:
Set inline fonction as extern to avoid symbol declaration

Changed in this revision

serial.h Show annotated file Show diff for this revision Revisions of this file
--- a/serial.h	Sat Nov 13 23:07:44 2010 +0000
+++ b/serial.h	Sat Nov 13 23:12:06 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()
+extern __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) {
+extern __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) {
+extern __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