Hello Ed Waugh,
Thanks a lot for your code re: reading/writing SD/MMC cards.
In the read/write block functions you use
SPI_WRITE(HIGH)varh));
where is HIGH and LOW defined? presumably it shifts the bits into an 8 bit integer for the SPI but the compiler does not recognise it and my eforts to emulate dont appear to work.
Best regards
Graham
Macros to play with low and high byte are normally used as HIGH(var) - not (HIGH)var.
Anyway - if you know your shift instructions, and how to mask bits, it's trivial to implement a macro HIGH() to pick up high byte of a 16-bit number and LOW() to pick up low byte.