APM:Libraries
|
#include <AP_HAL/AP_HAL.h>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include "GPIO.h"
#include "Util_RPI.h"
Go to the source code of this file.
Macros | |
#define | BCM2708_PERI_BASE 0x20000000 |
#define | BCM2709_PERI_BASE 0x3F000000 |
#define | GPIO_BASE(address) (address + 0x200000) |
#define | GPIO_MODE_IN(g) *(_gpio+((g)/10)) &= ~(7<<(((g)%10)*3)) |
#define | GPIO_MODE_OUT(g) *(_gpio+((g)/10)) |= (1<<(((g)%10)*3)) |
#define | GPIO_MODE_ALT(g, a) *(_gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) |
#define | GPIO_SET_HIGH *(_gpio+7) |
#define | GPIO_SET_LOW *(_gpio+10) |
#define | GPIO_GET(g) (*(_gpio+13)&(1<<g)) |
Variables | |
static const AP_HAL::HAL & | hal = AP_HAL::get_HAL() |
#define BCM2708_PERI_BASE 0x20000000 |
Definition at line 22 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::init().
#define BCM2709_PERI_BASE 0x3F000000 |
Definition at line 23 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::init().
#define GPIO_BASE | ( | address | ) | (address + 0x200000) |
Definition at line 24 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::init().
#define GPIO_GET | ( | g | ) | (*(_gpio+13)&(1<<g)) |
Definition at line 32 of file GPIO_RPI.cpp.
Referenced by VRBRAIN::VRBRAINGPIO::read(), PX4::PX4GPIO::read(), and Linux::GPIO_RPI::read().
#define GPIO_MODE_ALT | ( | g, | |
a | |||
) | *(_gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) |
Definition at line 29 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::pinMode().
#define GPIO_MODE_IN | ( | g | ) | *(_gpio+((g)/10)) &= ~(7<<(((g)%10)*3)) |
Definition at line 27 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::pinMode().
#define GPIO_MODE_OUT | ( | g | ) | *(_gpio+((g)/10)) |= (1<<(((g)%10)*3)) |
Definition at line 28 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::pinMode().
#define GPIO_SET_HIGH *(_gpio+7) |
Definition at line 30 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::write().
#define GPIO_SET_LOW *(_gpio+10) |
Definition at line 31 of file GPIO_RPI.cpp.
Referenced by Linux::GPIO_RPI::write().
|
static |
Definition at line 36 of file GPIO_RPI.cpp.