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.

CC2640R2 SDK - GPIO 和 PIN 两种driver的区别

CC2640R2 SDK 中的GPIO和PIN这两个driver都可以用来控制GPIO,之前用的是PIN driver,但现在要用到多个GPIO interrupt,在PIN driver中每个 pin hander只能设置一个回调,所以如果要多个GPIO interrup就需要建多个config表,并分别open。。。 今天看到再GPIO driver中就方便很多了,可以直接设置各个GPIO interrupt的callback。

PIN和GPIO中都有对IO进行输入、输出设置的API,在SDK example中有的example用的GPIO,有的用的PIN。   所以就感觉很疑惑,两种driver该怎样选择,各有什么利弊,适合什么场景。   (如果两种driver都是用,会对code size造成浪费)