RasPi Direct Hardware Access
Integrated peripheral access without operating system drivers.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions | Variables
hw.c File Reference

Definitions for the hardware register structure HW and initialization function raspi_map_hw(). More...

#include "raspi/hw.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>

Functions

int raspi_map_hw (void)
 Map the hardware registers into the current user-space process. Return true if successful, false on error.
 

Variables

raspi_peripheralspHW = (raspi_peripherals *)ARM(0)
 Hardware registers base pointer. See HW.
 

Detailed Description

Definitions for the hardware register structure HW and initialization function raspi_map_hw().

Anything else is contained in raspi/hw.h.

Due to its small size, you may want to #include this file in exactly one of your source files instead of compiling and linking it separately.

License

Copyright (c) 2013 OFFIS e.V.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.