Code: Select all
// FYI I trimmed this code down to the essentials to showcase my issue.
const unsigned int ERR__ALL_FUBAR = 15;
sbit pin_o_error at LATA7_bit;
void handle_error(const unsigned int);
void main()
{
handle_error(ERR__ALL_FUBAR);
}
void handle_error(const unsigned int error_num)
{
// Set period of error pin to "error_num" # of milliseconds
pin_o_error = 1;
Delay_ms(error_num); // <-- Compile error "Integer const expected"
pin_o_error = 0;
}
Isn't error_num an "Integer const"?
The MikroC PRO Help document shows the following function prototype for Delay_ms:
Code: Select all
void Delay_ms(const unsigned int time_in_ms);
I would like to use Delay_ms() because, according to the Help document, it's more precise than VDelay_ms();