码迷,mamicode.com
首页 > 数据库 > 详细

zedboard的板级支持包GPIO例子

时间:2015-08-05 22:29:53      阅读:264      评论:0      收藏:0      [点我收藏+]

标签:

板级支持包例子

xgpio_example.c

This file contains a design example using the GPIO driver(XGpio) and hardware

* device.  It onlyuses a channel 1 of a GPIO device.

*

* This example can be ran on the Xilinx ML300 boardusing the Prototype Pins &

* LEDs of theboard connected to the GPIO.

这个文件包含了一个设计实例使用GPIO驱动(XGpio)和硬件设备。它只使用一个通道1的GPIO设备。* *这个例子可以跑在Xilinx ML300,板连接到GPIO的led。

xgpio_intr_example.c

This file contains a design example using the GPIO driver(XGpio) in an

* interrupt driven mode of operation. This example doesassume that there is

* an interrupt controller in the hardware system and theGPIO device is

* connected to the interrupt controller.

*

* This example is designed to work on the XilinxML300 board using the PowerPC

* 405 processor present in the VirtexIIPro device. Theexample uses the

* interrupt capability of the GPIO to detect push buttonpresses and control the

* LEDs on the board. When a button is pressed it will turnon and LED located

* closest to it. When the button is released it will turnoff the LED.

* This examples uses two channels of a GPIO such that it isnecessary to have

* dual channel capabilities.

*

* The buttons and LEDs are on 2 seperate channels ofthe GPIO so that interrupts

* are not caused when the LEDs are turned on and off.

*

* At the start of execution all LEDs will be turned on,then each one by itself,

* and then all on again followed by all turned off. Afterthis sequence, button

* presses are processed by interrupts.

*

* The following snippet from the UCF file of the hardwarebuild indicates the

* way the GPIOchannels are connected to the ML300 for the LEDs and buttons.

该文件包含使用GPIO驱动程序(XGpio)在一个设计实例

*操作中断驱动模式。这个例子并假设有*在硬件系统中的中断控制器和GPIO器件是*连接到中断控制器。*本示例是使用的PowerPC在赛灵思ML300板工作* 405处理器中存在VirtexIIPro设备。该示例使用*同时GPIO中断能力检测按钮按下和控制*在电路板上的LED。当按下一个按钮,它会打开并位于LED*最接近它。当松开按钮,它会关闭LED。*本实施例采用了两个信道的GPIO使得它必须有*双通道功能。*该按钮和指示灯都在GPIO的2个独立的渠道,使中断*不当LED被接通和断开而引起的。*在开始执行时所有LED将被打开,那么每一个本身,*然后将所有再然后是所有关闭。后该序列中,按钮*印刷机被中断处理。*从硬件构建的UCF文件下面的代码片段指示*方式将GPIO通道连接到ML300用于LED和按钮。

xgpio_intr_tapp_example.c

This file contains a design example using the GPIO driver(XGpio) in an

* interrupt driven mode of operation. This example doesassume that there is

* an interrupt controller in the hardware system and theGPIO device is

* connected to the interrupt controller.

*

* This file is used by the TestAppGen utility to include asimplified test for

* gpio interrupts.

 

* The buttons and LEDs are on 2 seperate channels ofthe GPIO so that interrupts

* are notcaused when the LEDs are turned on and off.

该文件包含使用GPIO驱动程序(XGpio)在一个设计实例*操作中断驱动模式。这个例子并假设有*在硬件系统中有中断控制器并且GPIO器件是连接到中断控制器的。

**本文件所使用的TestAppGen,包括简化测试* GPIO中断。

*该按钮和指示灯都在GPIO的2个独立的通道,使中断*不当LED被接通和断开而引起的。

xgpio_low_level_example.c

This file contains a design example using the GeneralPurpose I/O (GPIO) low

* level driver and hardware device. It only uses a channel1 of a GPIO device.

这个文件包含了一个设计实例使用通用I /O(GPIO)低*驱动程序和硬件设备水平。它只使用一个通道1的GPIO设备。

xgpio_tapp_example.c

* This file contains a example for using GPIO hardware anddriver.

* This example assumes that there is a UART Device or STDIODevice in the

* hardwaresystem.

*这个文件包含一个示例使用GPIO的硬件和驱动程序。*这个例子假设有一个UART设备或STDIO设备的硬件系统。

 

版权声明:本文为博主原创文章,未经博主允许不得转载。

zedboard的板级支持包GPIO例子

标签:

原文地址:http://blog.csdn.net/kobesdu/article/details/47302701

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!