- &extbrd {
- status = "okay";
- io-channels = <&saradc 0>, <&saradc 1>;
- - ext-leds = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>, /* GPIO0_A5 */
- + ext-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>, /* GPIO0_A5 */
- <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>, /* GPIO1_B1 */
- <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>, /* GPIO1_B2 */
- <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; /* GPIO0_A6 *
复制代码
- echo 1 > /sys/class/gpio/gpio41/value
复制代码
拉低:- echo 0 > /sys/class/gpio/gpio41/value
复制代码
读取当前GPIO电平值:- cat /sys/class/gpio/gpio41/value
复制代码
其他GPIO均类似操作,仅需修改对应的GPIO号即可- cat /sys/devices/platform/extbrd/extadckey0
复制代码
ADC1:- cat /sys/devices/platform/extbrd/extadckey1
复制代码
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |