Renesas TM V.3.20A Specifikace Strana 237

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 762
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 236
/* address declaration */
#define io_P2 (*(volatile unsigned short *) 0x00800200)
/* access to each bit (write 0 to extra bit) */
#define SET_P2_B5(x) (io_P2=(io_P2 & 0x03DF)|(x)<<5)
#define SET_P2_B8(x) (io_P2=(io_P2 & 0x02FF)|(x)<<8)
/* example function for accessing bit field with macro */
void
foo2()
{
/* write 0 to bit No. 8 */
SET_P2_B8(0);
/* write 0 to bit No. 5 */
SET_P2_B5(0);
}
[Reference]
CC32R does not generate a code for accessing the bit field with a specific size (half-word, etc.). It automatically accesses the bit
field with the minimum size.
Top of Page | Back to Previous Page
Terms of Use Privacy Policy
(C)2004 Renesas Technology Corp., All Rights Reserved.
Zobrazit stránku 236
1 2 ... 232 233 234 235 236 237 238 239 240 241 242 ... 761 762

Komentáře k této Příručce

Žádné komentáře