Question: what does the (CHAR) syntax do in the following line of code?
spi_transfer((char)(address>>8)); //send MSByte address first
Question: what does the (CHAR) syntax do in the following line of code?
spi_transfer((char)(address>>8)); //send MSByte address first
That is what's called a typecast. It casts the variable on its immediate right to the type specified within the parenthesis (char - in your case).
I thought you might be asking what the 8) is doing in that line of code.
.