C Programming Error: 'ack' bit variable must be global or static
To fix the error, you can declare the 'ack' variable as a static variable within the function like this:
void tuner_write_WB(U8 tuner_command, U8 tuner_length)
{
U8 length = 0;
static bit ack;
}
By declaring it as static, the variable will retain its value between function calls and can be used in subsequent calls without being re-initialized.
原文地址: https://www.cveoy.top/t/topic/me7V 著作权归作者所有。请勿转载和采集!