Keil Logo Arm Logo

Discussion Forum

MMC read block uses (HIGH(varh)); HIGH not CCS C recognised

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
graham kingsley
Posted
20-Apr-2012 20:31 GMT
Toolset
None
New! MMC read block uses (HIGH(varh)); HIGH not CCS C recognised

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
New! RE: MMC read block uses (HIGH(varh)); HIGH not CCS C recognised

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.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.