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.

C Programming Error: 'ack' bit variable must be global or static

原文地址: https://www.cveoy.top/t/topic/me7V 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录