I'm trying to write a function which will then pass on which test to run:
static uint8_t (*GetTest(uint8_t test_type))(void)
{
switch(test_type) {
case 0:
return &test_a;
case 1:
return etc etc...
}
}
static void test_a(void)
{
;
}
However, I get a warning from my compiler saying that the return value type does not match the function type. I believe that this is due to the static declarations of the function, but I am unsure of how to include them.
GetTesttakes a parameter ofunit8_t.test_ahas no parameters. They are not compatible.void test_a(void)is not the same asuint8_t test(void).