I am writing an interfacing program for AT28C64B with C8051F120 microcontroller.
But my doubt is " I want to return the STATUS for Write function whether Success or not. I may use an int or char for this. But what I am Thinking is, is it possible to return bit type for a function."
Also i want to know whether I can pass a bit as an argument to a function or not.
You cannot pass a bit to a function. Nor can you obtain a bit response.
The smallest unit of data you can probably pass will be a byte.
(Unless you are using something unusual)
Your compiler may make it appear to be passing a bit however it
will simply be extracting the bit from the byte for you in the function.
The choice is:
You could allow this to happen if your compiler does this with a "bit" type
or
You can extract the bit from a char/byte or whatever manually yourself
such as pk_volt suggested.