Linux kernel header file macro about S3C2410 gpio1. gpio register Definition
1. # define gpcon (x) _ reg2 (0x56000000, (x) * 0x10)
This statement defines the control register of gpio 2410. Note that the _ reg2 parameter is the physical address of the register. This physical address is converted to a virtual address through the _ reg2 macro, compare the 2410 manual to get the corresponding relationship:
Gpco
Video: Http://pan.baidu.com/s/1c06oitiThe initialization of the GPIO? Using the command "LS drivers/gpio/*.o" in the kernel source directory, you can see that "Gpio-exynos4" is compiled into the kernel– Generate the. o File represents the final compilation into the kernel– In addition to the Menuconfig configuration file, the. o file can also be used to determine
: Because in most cases the status change of a GPIO triggers the application to perform some actions. In order to facilitate the NRF51 official to encapsulate the process into Gpiote, full name: The GPIO Tasks and Events (gpiote).From Gpio level changes to the process of generating interrupt events1. Gpiote OverviewNRF51 has 32
STM32 Learning is a gradual process, gradually familiar with a peripheral, to understand the register-related configuration, and then on this basis to achieve the function, the road to a step by step, grasp the knowledge of more natural know the direction of the road. Gpio is the most important peripheral of STM32, and almost all peripheral implementations are based on GPIO, so in-depth understanding is nec
Original Source:
http://blog.chinaunix.net/uid-22030783-id-3391515.html
First introduced the Samsung S3C24XX platform BSP definition peripheral registers and GPIO related header file to linux-3.4 system as an example, linux2.6.37 system is similar, just keep the directory is different
The header files of the platform are stored in the arch/arm/mach-s3c24xx/include/mach/directory
Memory Map definitions defines the 8-bank address of the Samsung platfor
Concept and role
It is unclear here that the basic architecture of GPIO in the actual computer, after all, is in the software level, to develop, so the hardware is ignorant. Especially in the kernel compilation process, there is a compilation problem, do not know how the kernel developers to solve the problem. The current problem is whether the server requires a GPIO module.In the actual MCU,
Mail: bookworepeng@Hotmail.com
QQ: 196568501
Author: drivemonkey
Undertake various embedded outsourcing projects (phone: 13410905075)
Two tools are available for Linux to debug gpio.
Dubugfs
The other is the gpio driver framework of Linux.
First, debugfs's usage for gpio debugging
1. debugfs on Mount
Mount-T debugfs/sys/kernel/debug
2. F
This article was reproduced from: http://m.blog.csdn.net/kris_fei/article/details/69553422Platform:rockchipOs:android 6.0kernel:3.10.92Because the board does not have LCD can not know the SD card upgrade is completed, so use LED display.Control the Gpio output high-lit LEDs after the upgrade is complete in the recovery.system comes with Gpio control driver:The kernel has its own generic
1. Set the hardware environment as a macro definition to facilitate the hardware environment modification:
The setting contains three items: Gpio port, Gpio pin number, and GPIO port clock. Examples such as the following
#define Led1_pin gpio_pin_10
#define Led1_gpio_port gpioh
#define LED1_GPIO_CLK rcc_ Ahb1periph_gpioh
#define Led2
Android (Java) controls GPIO methods and time consumption analysis, androidgpio
The previous two Articles respectively introduced how to control gpio by using scripts and C code to read/sys/class/GPIO. In actual project debugging, you often need to control GPIO in the Java code. Its implementation is similar to that in
40 Gpio on a Raspberry Pi is the best thing to play.They can be directly controlled by c,/c++, Python, Java and other languages.Now, let's see how to do the same thing with node. js.Before you try, install node. js, and move to: 1. Prepare the Test foldermkdir/home/pi/documents/test-gpio-demo/2. Create a file Package.json{ "name":"Test-gpio-demo", "version":"0.
Lesson 7 on BBB Board: gpio Programming Control
In the first class, we made a simple gpio port output high and low level output through the IO function to enable and disable the control of an LED indicator. This section uses the complete C ++ program, implement all the functions of the shell script in Lesson 4 to enable alternate shining of two LED lights.
Directly go to the functional program
1. Implement
In sdk1.1 (the latest SDK) officially provided by cpress, a large number of routines are provided for our reference during software development, just like the development of stm32, but it is not a library, just a reference routine.
First, let's look at a simple gpio example (gpioapp)
1.First, it is an error processing function. We don't need it, so this is an endless loop.
2.Cyfxdebuginit: uses the serial port as the debugging port with 115200bps.
Configuring Gpio pins in a non-platform mannerThe GPIO PIN is configured in a non-platform manner and is directly read and written to its Gpio group registers. Because the register physical address cannot be manipulated directly, all need to use IOREMAP to map the physical address of the GPIO register to a virtual addr
Cpress's official SDK1.1 (currently the latest SDK) provides a number of examples for us to develop the software as a reference, just like the development of STM32, but not the library, just a reference routine.
First look at a simple example of a gpio (Gpioapp)
1. first an error-handling function, we don't need it, so this is a dead loop.
2. Cyfxdebuginit This function, the serial port as the debug port with 115200bps.
3.
void CYFXGPIOINTRCB (
ui
Normal through the file system access to the value of Ain serial port, you can use Fread and other file IO read/sys/bus/iio/devices/iio:device0/in_voltage*_raw content.
But this requires high frequency access to the ADC is very inefficient, the data needs to be copied from the disk to the kernel process space, and then copied to the user process space, consuming unnecessary resources.
This problem can be solved by memory innuendo, Mmap can realize the data copy of disk data to user main memory,
For beginners, why not control the output when using PB3 and PB4.
The following is an analysis of this issue.
First, after the STM32F10X series MCU is reset, the PA13/14/15 PB3/4 is configured as a JTAG feature by default. Sometimes in order to make full use of the resources of the MCU I/O port, theseThe port is set to a normal I/O port. Here's how:In Gpio_configuration (); Configure the GPIO ports used:
Gpio_pinremapconfig (gpio_remap_swj_disable,
1. What is gpio?
The full name of gpio is general-purpose Io ports, that is, general input and output ports.
In embedded systems, many simple external devices or Circuits need to be controlled. Some of these devices need to be controlled by the CPU, and some need the CPU to provide the input signal. In addition, as long as many devices or circuits require an on/off two shaped bodies, such as LED light and o
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.