xpress_embedo
Advanced Member level 4
- Joined
- Jul 5, 2011
- Messages
- 1,154
- Helped
- 161
- Reputation
- 396
- Reaction score
- 189
- Trophy points
- 1,353
- Location
- India
- Activity points
- 10,591
This is a header file i found, when i am reading the PIC32 Bootloader Code:-
I am not able to get what this macro do:-
#define Ux U2##y
What i assume is that the line
#define UxBRG Ux(BRG)
and UxBRG is equilavent to U2BRG
What is this ##?
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #ifndef __UART_H__ #define __UART_H__ #define DEFAULT_BAUDRATE 115200 #define Ux(y) U2##y #define UxBRG Ux(BRG) #define UxMODE Ux(MODE) #define UxSTA Ux(STA) #define UxSTAbits Ux(STAbits) #define UxSTACLR Ux(STACLR) #define UxSTASET Ux(STASET) #define UxTXREG Ux(TXREG) #define UxRXREG Ux(RXREG) #define TRANS_LAYER_Init UartInit #define TRANS_LAYER_Task UartTask #define TRANS_LAYER_Close UartClose extern void TRANS_LAYER_Init(UINT); extern void TRANS_LAYER_Task(void); extern void UartClose(void); #endif
I am not able to get what this macro do:-
#define Ux U2##y
What i assume is that the line
#define UxBRG Ux(BRG)
and UxBRG is equilavent to U2BRG
What is this ##?