lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

When the Pi use bcm2835.c?

Mon Nov 10, 2014 2:03 am

I am looking at the Pi kernel and see this

https://github.com/raspberrypi/linux/tr ... /bcm2835.c

when does pi use that file? Not at at the booting stage because at booting it uses boot code.bin.

Heater
Posts: 15950
Joined: Tue Jul 17, 2012 3:02 pm

Re: When the Pi use bcm2835.c?

Mon Nov 10, 2014 2:34 am

You seem to be looking for the kernel driver for the GPIO pins.

That file may or may not be it but:
when does pi use that file?
A Linux device driver can be:

a) Compiled and linked into the kernel binary when you build the kernel. A disk driver for example needs to be built into the kernel so that it is available at start up. You can't read a disk with out a driver and you need to read the disk to continue boot up of the OS.

b) Compiled into a separate "kernel module" that can be loaded and unloaded from the kernel at run time. Such a driver might be for USB devices. The driver being loaded when a particular USB device is plugged in at run time.

What actually are you trying to do?
Memory in C++ is a leaky abstraction .

Return to “C/C++”