The idea is to read any bit from a port. Anyway accessing to one known bit is simple, like
P0_0 <-- gets bit 0 from port 0
But if i need to access bit y via function?
read_bit(__bit y){
return P0_y; // <-- just an idea but its not right becouse of syntax.
}
using SDCC to program and 8051 header.