RK3399 android7.1 u-boot中对GPIO口操作

diff --git a/common/board_f.c b/common/board_f.c
old mode 100644
new mode 100755
index c1825d8..53fb652
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -836,6 +836,24 @@ static int initf_dm(void)
 	return 0;
 }
 
+static int my_set_gpio(void)
+{
+//gpio2_B1
+	gpio_direction_output((GPIO_BANK2 | GPIO_B1), 1);
+
+//gpio2_A5
+	gpio_direction_output((GPIO_BANK2 | GPIO_A5), 1);
+
+//gpio2_A4
+	gpio_direction_output((GPIO_BANK2 | GPIO_A4), 1);
+
+//gpio2_B4
+	gpio_direction_output((GPIO_BANK2 | GPIO_B4), 1);
+
+//gpio2_B2
+	gpio_direction_output((GPIO_BANK2 | GPIO_B2), 1);
+}
+
 static init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_SANDBOX
 	setup_ram_buf,
@@ -1030,6 +1048,7 @@ static init_fnc_t init_sequence_f[] = {
 #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX)
 	jump_to_copy,
 #endif
+	my_set_gpio,  //@add for gpio
 	NULL,
 };
 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值