1
0
Fork 0
forked from len0rd/rockbox

set/clear port bits with atomic instructions instead of read-modify-write, saves time+space, allows port usage in ISR

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4023 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jörg Hohensohn 2003-11-06 07:08:22 +00:00
parent 75bab49a54
commit 0dd7d48c3a

View file

@ -153,6 +153,17 @@
#define CASCR_ADDR 0x05FFFFEE
/* byte halves of the ports */
#define PADRH_ADDR 0x05FFFFC0
#define PADRL_ADDR 0x05FFFFC1
#define PBDRH_ADDR 0x05FFFFC2
#define PBDRL_ADDR 0x05FFFFC3
#define PAIORH_ADDR 0x05FFFFC4
#define PAIORL_ADDR 0x05FFFFC5
#define PBIORH_ADDR 0x05FFFFC6
#define PBIORL_ADDR 0x05FFFFC7
/* Port B data register bits */
#define PBDR_LCD_SDA 0x0001 /* LCD serial data */
#define PBDR_LCD_SCK 0x0002 /* LCD serial clock */
@ -310,6 +321,17 @@
#define CASCR (*((volatile unsigned char*)CASCR_ADDR))
/* byte halves of the ports */
#define PADRH (*((volatile unsigned char*)PADRH_ADDR))
#define PADRL (*((volatile unsigned char*)PADRL_ADDR))
#define PBDRH (*((volatile unsigned char*)PBDRH_ADDR))
#define PBDRL (*((volatile unsigned char*)PBDRL_ADDR))
#define PAIORH (*((volatile unsigned char*)PAIORH_ADDR))
#define PAIORL (*((volatile unsigned char*)PAIORL_ADDR))
#define PBIORH (*((volatile unsigned char*)PBIORH_ADDR))
#define PBIORL (*((volatile unsigned char*)PBIORL_ADDR))
/***************************************************************************
* Register bit definitions
**************************************************************************/