amar
amar

Reputation: 499

lpc1788 cortex m3 interrupt handling with uclinux

I am newbie for the uclinux device drivers please guide me how to do this..

suppose I have connected a switch to one of the cortex m3 controller pin and whenever the switched is press the LED connected to other pin of controller as to light.

how to write the driver and registering of driver and how can access the driver from the user space...??

Please explain me with a simple example.

Upvotes: 2

Views: 780

Answers (1)

stdcall
stdcall

Reputation: 28920

As I understand, you want a LED to light up once a button is pressed, this can be done completely as an interrupt handler in a kernel module, no need for a user-space application. Beginning kernel module programming is very exciting, and I suggest you take a look in the kernel module hello world example.

This will get you started to fill how kernel modules looks like, how they are compiled and loaded. further reading will be of course Linux device drivers 3rd edition, which is freely available here

Regarding user-space <--> driver communication, the kernel allows various types of device driver interfaces, such as regular char devices, sysfs, procfs, etc. You can read the appropriate chapters on Linux device drivers 3rd edition

Upvotes: 1

Related Questions