#define QUAD_SPEED_SAMPLE_TIME 0.2 #define TIMER0_PRESCALER 64 #define QUAD_SAMPLE_TIME_COUNT (int) (F_CPU*QUAD_SPEED_SAMPLE_TIME/256/TIMER0_PRESCALER) ... #if QUAD_SAMPLE_TIME_COUNT < 1 #error "Sample period too short, or prescaler too large" #endif
Error: missing binary operator before token "("
I've trying making the QUAD_SAMPLE_TIME_COUNT into a function accepting the "TIMER0_PRESCALER" variable, but I just had the exact same error message. I also tried calculating QUAD_SAMPLE_TIME_COUNT and then made a new variable TEMP_SAMPLE and tried testing that against "< 1" with the same problem.
I'm at a loss.