Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the external interrupt of pcDuino

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use pcDuino external interrupts to share with you, the editor feels very practical, so share with you to learn, I hope you can learn something after reading this article, say no more, follow the editor to have a look.

Key interrupt-poll mechanism

We try to make the keystroke have such a function that if no one presses the button within a certain period of time, the kernel alerts us, and then our application is reminded to print time out.

Driver program

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

/ / # include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# include

# define GPIO_IRQ 28

# define GPIO_TEST_BASE 0xf1c20800

# define PH_CFG2 (GPIO_TEST_BASE + 0x104)

# define PIO_INT_CFG2 (GPIO_TEST_BASE+ 0x208)

# define PIO_INT_CTL (GPIO_TEST_BASE+ 0x210)

# define PH17_SELECT (6

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report