Society of Robots - Robot Forum
Software => Software => Topic started by: PAT_McUser on April 08, 2010, 03:25:20 AM
-
hi, my issue is that I want create a method that returns by given Port and Port_numb a calculation of sensor data.
I want to call with something like
int a;
a=Data(PINA,0);
My question is how the signature of the method Data has to look like for Argument "PINA".
What must I replace the "????" in the following code to get the prog running?
int Data( ???? P, int N)
{
int erg;
if(bit_is_set(P,N)){
//do something math stuff
}
return erg;
}
-
Maybe unsigned char is the the solution. I'm will test it in 3-4h.
unsigned char definitely doesn't work.
-
bit_is_set(P,N)
What data type is P declared as in the bit_is_set function?
-
bit_is_set(P,N)
What data type is P declared as in the bit_is_set function?
I don't know...
-
bit_is_set(P,N)
What data type is P declared as in the bit_is_set function?
I don't know...
its port, but it doesn't work.