Replaced constants with macros.

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@175 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 718bd6a562
commit 1814af1563

@ -95,10 +95,10 @@ typedef volatile struct PM_registers {
#define PCFR_FP bit(1)
#define PCFR_OPDE bit(0)
/* PPCR bits */
/* PPCR bits - see 9.5.7.3 in [1] */
#define PPCR_CCF_MASK 0x1F
#define PPCR_CCF(x) (x & PPCR_CCF_MASK)
#define PPCR_CCF_MASK bits(4,0)
#define PPCR_CCF(x) bits_val(4,0,x)
#define PPCR_CCF_59_0 PPCR_CCF(0x00)
#define PPCR_CCF_73_7 PPCR_CCF(0x01)

@ -74,15 +74,15 @@ typedef volatile struct SSP_registers {
#define SSDR_OFFSET 0x0C
#define SSSR_OFFSET 0x14
/* SSCR0 bits */
/* SSCR0 bits - see 11.12.9 */
#define SSCR0_SCR_MASK 0xFF00
#define SSCR0_SCR(x) ((x << 8) & SSCR0_SCR_MASK)
#define SSCR0_SCR_MASK bits(15,8)
#define SSCR0_SCR(x) bits_val(15,8,x)
#define SSCR0_SSE bit(7)
#define SSCR0_FRF_MASK 0x0030
#define SSCR0_FRF(x) ((x << 4) & SSCR0_FRF_MASK)
#define SSCR0_DSS_MASK 0x000F
#define SSCR0_DSS(x) (x & SSCR0_DSS_MASK)
#define SSCR0_FRF_MASK bits(5,4)
#define SSCR0_FRF(x) bits_val(5,4,x)
#define SSCR0_DSS_MASK bits(3,0)
#define SSCR0_DSS(x) bits_val(3,0,x)
/* SSCR1 bits */

Loading…
Cancel
Save