AnsweredAssumed Answered

SPI_MCR_SMPL_PT_MASK SPI_MCR_SMPL_PT_SHIFT SPI_MCR_SMPL_PT (x)

Question asked by nikivendola on Jun 23, 2015
Latest reply on Jul 14, 2015 by Earl Orlando Ramirez Sanchez

Hi all,

can anyone explain the behavior of:
#define SPI_MCR_SMPL_PT_MASK 0x300u
#define SPI_MCR_SMPL_PT_SHIFT 8
#define SPI_MCR_SMPL_PT (x) (((uint32_t) (((uint32_t (x)) << SPI_MCR_SMPL_PT_SHIFT)) & SPI_MCR_SMPL_PT_MASK)
How are they used? Because I have a 3 to register?

Outcomes