各位大侠,能给我解释下这段代码么?刚接触,看不懂这段代码
// Setup SPI to RAIDAES
PMAPPWD = 0x02D52; // Get write-access to port mapping regs
P1MAP3 = PM_NONE;
P2MAP0 = PM_NONE;
P3MAP2 = PM_UCA0SIMO; // Map UCB0SIMO input to P3.2
P3MAP1 = PM_UCA0SOMI; // Map UCB0SOMI output to P3.1
P3MAP3 = PM_UCA0CLK; // Map UCB0CLK input to P3.3
P3MAP5 = PM_TA1CCR0A; // Map Capture Compare Register to P3.5 to measure CLK_OUT
PMAPPWD = 0; // Lock port mapping registers
dong QU2:
回复 灰小子:
貌似重映射可以配置成好几十种功能口,是不是可配置口都可以随意配置成某一功能口呢?还有,默认映射为某一功能口的话,使用时就不用写重映射这段代码了吧?谢谢啊~
灰小子:
回复 dong QU2:
datasheet里有个io可映射的表,表里有的才能重映射。io默认的功能一般不用配置。