1.GPIO_write,GPIO_read和PIN_setOutputValue的区别?
2.使用他们都需要做哪些初始化?
3.PIN_init(BoardGpioInitTable),是两种使用方法都必须预先调用的吗?
Susan Yang:
关于 GPIO.h 和 PIN.h
The GPIO driver is supported for all device families except CC26xx/CC13xx. For the CC26xx/CC13xx device family, the PIN driver should be used. There is a GPIO driver for the CC26xx/CC13xx family within the driver product, however it is not promoted nor supported for external customer use.
Susan Yang:
关于PIN_init,您可以看一
software-dl.ti.com/…/_p_i_n_8h.html
Mingxin Chen:
回复 Susan Yang:
意思是用PIN模式,不要用GPIO模式吗, 如果要用GPIO模式要怎么操作呀
Susan Yang:
回复 Mingxin Chen:
您可以看一下 dev.ti.com/…/_g_p_i_o_c_c26_x_x_8h.html
da qin zheng sheng:
1. 打开io clk时钟
da qin zheng sheng:
回复 da qin zheng sheng:
第二步,设置ioc寄存器,可以为普通io,或者串口等
Mingxin Chen:
回复 Susan Yang:
意思是:GPIO模式要用于三个结构体:GPIO_PinConfig, GPIO_CallbackFxn, GPIOCC26XX_Config,是吧,
那PIN_init(BoardGpioInitTable)还需要调用吗?
Susan Yang:
回复 Mingxin Chen:
GPIO_init() must be called before any other GPIO APIs. This function configures each GPIO pin in the user-provided GPIO_PinConfig array according to the defined settings. The user can also reconfigure a pin dynamically after GPIO_init() is called by using the GPIO_setConfig(), and GPIO_setCallback() APIs.
需要调用GPIO_init()