I once managed to return the function, and with that when I run the test it passed I Have this function on utils.c:
int (util_sys_inb)(int port, uint8_t *value) {
uint32_t val;
if(sys_inb(port, &val) != OK) return 1;
*value = (uint8_t)val;
return 0;
}
This one is just for wrapping up the function sys_inb(), because of the format of the argument. Then I need to get right the number of times that this is called. I have this other file : keyboard.c with a global variable, extern int count.
with this function:
int sys_inb_count(int port, uint8_t *value) {
if(util_sys_inb(port,value)!=OK){ return 1;}
count++;
return count;
}
I got this right once, returning the value on the first function, but then I did something differently, and the tests were not able to pass anymore. Appreciate if you can help, me, I've been pulling my hair out.
I tried, put the counter straight on the first function and it worked, but then I tried to do it again, and then I could not anymore.
It compiles and runs but I get this: https://i.stack.imgur.com/tFpVR.jpg