Zedboard's board Support package Gpio Example

Source: Internet
Author: User

Board-level support package Examples

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 is ran on theXilinx ML300 boardusing the Prototype Pins &

* LEDs of Theboard connected to the GPIO.

This file contains a design instance using Gpio drivers (xgpio) and hardware devices. It only uses a GPIO device of Channel 1. * * This example can be run on Xilinx ML300, board connected to Gpio LEDs.

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, there is

* An interrupt controller in the hardware system and Thegpio device is

* Connected to the interrupt controller.

*

* This example are designed to work on theXilinxML300 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'll turnon and LED located

* Closest to it. When the button is released it'll turnoff the LED.

* This examples uses the channels of a GPIO such that it isnecessary to has

* Dual channel capabilities.

*

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

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

*

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

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

* Presses is processed by interrupts.

*

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

* The Gpiochannels is connected to the ML300 for the LEDs and buttons.

The file contains a design instance using the Gpio driver (Xgpio)

* Operation Interrupt Drive mode. This example assumes that there is an interrupt controller in the hardware system and that the GPIO device is * connected to the interrupt controller. * This example is used by the PowerPC in the Xilinx ML300 Board working * 405 processor in the presence of virtexiipro device. The example uses the * simultaneous GPIO interrupt Capability detection button to press and control the LEDs on the board. When you press a button, it opens and is located led* closest to it. When the button is released, it turns off the LED. * This embodiment uses two channels of gpio so that it must have * dual Channel function. * The button and the LEDs are in the Gpio 2 independent channels, so interrupt * improper LED is connected and disconnected caused by. * At the beginning of execution all LEDs will be opened, so each one itself, * then will all again then be all off. After the sequence, the button * presses are interrupted to process. * The following code snippet from the hardware-built UCF file indicates the * way to connect the Gpio channel to the ML300 for LEDs and buttons.

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, there is

* An interrupt controller in the hardware system and Thegpio device is

* Connected to the interrupt controller.

*

* This file was used by the Testappgen utility to include asimplified test for

* Gpio interrupts.

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

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

The file contains the interrupt driven mode using the Gpio driver (Xgpio) in a design instance * operation. This example assumes that there is an interrupt controller in the hardware system and that the GPIO device is connected to the interrupt controller.

* * Testappgen used in this document, including simplified test * gpio interrupts.

* The button and the LEDs are on the Gpio 2 independent channels, so interrupt * improper LED is connected and disconnected caused by.

xgpio_low_level_example.c

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

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

This file contains a design instance that uses a generic I/O (GPIO) low * Driver and hardware device level. It only uses a GPIO device of Channel 1.

xgpio_tapp_example.c

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

* This example assumes, there is a UART Device or Stdiodevice in the

* Hardwaresystem.

* This file contains an example of using GPIO hardware and drivers. * This example assumes a hardware system for a UART device or stdio device.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Zedboard's board Support package Gpio Example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.