MMC read block uses (HIGH(varh)); HIGH not CCS C recognised
graham kingsley
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
Read-Only
Author Per Westermark
Posted 20-Apr-2012 22:31 GMT
Toolset None
RE: MMC read block uses (HIGH(varh)); HIGH not CCS C recognised
Per Westermark
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.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.