I have a piece of code I'd like to make Arduino editor friendly. The code is written in C and contains macros the Arduino IDE can't deal with. Is it a good idea to turn those macros into functions?
#define AN221_EXECUTE_Low cbi(PORTA, PIN0) //drive EXECUTE low #define AN221_PORb_High sbi(PORTA, PIN1) //drive PORb high #define AN221_ACTIVATE bit_is_set(PINA, PIN2) //sense ACTIVATE high #define AN221_NO_ERROR bit_is_set(PINA, PIN3) //sense ERRb high i.e. no rror #define AN221_ERRb_Input outp(0xEB, DDRA) //make uP drive ERRb #define AN221_ERRb_Output outp(0xE3, DDRA) //make uP sense ERRb