c macro
c macro
(OP)
how can we write a macro in C?
for eg. write a macro to do binary serch
for eg. write a macro to do binary serch
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: c macro
#define USART1_BAUDRATE(br, fosc) ((fosc)/((br)*161)-1)
it is usually some sort of value replacement and macro commands have a very limited number of commands. To do a binary search you will need to write a program (or fuction) in C itself.
Good Luck, John