This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于InstaSPIN-FOC的编程问题

例程中,看到很多类似下面这种编程方式,但是gpioHandle本身就是GPIO句柄,感觉没必要才强制转换一次,直接gpioHandle->GPAMUX1 &= (~clearBits)就可以了,不知道例程中的这种编程方式有啥好处,还求大神指点。谢谢!

......

GPIO_Obj *gpio = (GPIO_Obj *)gpioHandle;

// clear the bits
gpio->GPAMUX1 &= (~clearBits);

// set the bits
gpio->GPAMUX1 |= setBits;