|
LMS 2012
|
Go to the documentation of this file.
22 #define CSL_FMK(PER_REG_FIELD, val) \
23 (((val) << CSL_##PER_REG_FIELD##_SHIFT) & CSL_##PER_REG_FIELD##_MASK)
26 #define CSL_FEXT(reg, PER_REG_FIELD) \
27 (((reg) & CSL_##PER_REG_FIELD##_MASK) >> CSL_##PER_REG_FIELD##_SHIFT)
30 #define CSL_FINS(reg, PER_REG_FIELD, val) \
31 ((reg) = ((reg) & ~CSL_##PER_REG_FIELD##_MASK) \
32 | CSL_FMK(PER_REG_FIELD, val))
37 #define CSL_FMKT(PER_REG_FIELD, TOKEN) \
38 CSL_FMK(PER_REG_FIELD, CSL_##PER_REG_FIELD##_##TOKEN)
41 #define CSL_FINST(reg, PER_REG_FIELD, TOKEN) \
42 CSL_FINS((reg), PER_REG_FIELD, CSL_##PER_REG_FIELD##_##TOKEN)
47 #define CSL_FMKR(msb, lsb, val) \
48 (((val) & ((1 << ((msb) - (lsb) + 1)) - 1)) << (lsb))
51 #define CSL_FEXTR(reg, msb, lsb) \
52 (((reg) >> (lsb)) & ((1 << ((msb) - (lsb) + 1)) - 1))
55 #define CSL_FINSR(reg, msb, lsb, val) \
56 ((reg) = ((reg) &~ (((1 << ((msb) - (lsb) + 1)) - 1) << (lsb))) \
57 | CSL_FMKR(msb, lsb, val))