How do I toggle a gpio on the quick start board?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How do I toggle a gpio on the quick start board?

1,900 次查看
monzie
Contributor II

I'd like to set a gpio to be an output then toggle it using the GPIO Interfaces module built into linux.

ie.:

gpio_direction_output(unsigned gpio, int value);

gpio_set_value(unsigned gpio, int value);

My problem is what to use for the value unsigned gpio - this is a number that gets mapped to a pin on the processor.

Once I get this mapping then I can refer back to the schematics and choose a pin that is connected to one of the connectors.

I can't find this mapping in the documentation and I am not experienced enough to figure it out from the source code.  Although if someone pointed me in the right direction I could probably find it :-)

标签 (2)
0 项奖励
回复
1 回复

1,675 次查看
monzie
Contributor II

For the others new to linux arm the information is in Chapter 13 of the MX53UG.pdf