APM:Libraries
Macros | Variables
RCInput_RPI.cpp File Reference
#include <AP_HAL/AP_HAL.h>
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include "GPIO.h"
#include "RCInput_RPI.h"
#include "Util_RPI.h"
Include dependency graph for RCInput_RPI.cpp:

Go to the source code of this file.

Macros

#define debug(fmt, args ...)
 
#define RCIN_RPI_BUFFER_LENGTH   8
 
#define RCIN_RPI_SAMPLE_FREQ   500
 
#define RCIN_RPI_DMA_CHANNEL   0
 
#define RCIN_RPI_MAX_COUNTER   1300
 
#define PPM_INPUT_RPI   RPI_GPIO_5
 
#define RCIN_RPI_MAX_SIZE_LINE   50
 
#define RCIN_RPI_RPI1_DMA_BASE   0x20007000
 
#define RCIN_RPI_RPI1_CLK_BASE   0x20101000
 
#define RCIN_RPI_RPI1_PCM_BASE   0x20203000
 
#define RCIN_RPI_RPI2_DMA_BASE   0x3F007000
 
#define RCIN_RPI_RPI2_CLK_BASE   0x3F101000
 
#define RCIN_RPI_RPI2_PCM_BASE   0x3F203000
 
#define RCIN_RPI_GPIO_LEV0_ADDR   0x7e200034
 
#define RCIN_RPI_DMA_LEN   0x1000
 
#define RCIN_RPI_CLK_LEN   0xA8
 
#define RCIN_RPI_PCM_LEN   0x24
 
#define RCIN_RPI_TIMER_BASE   0x7e003004
 
#define RCIN_RPI_DMA_SRC_INC   (1<<8)
 
#define RCIN_RPI_DMA_DEST_INC   (1<<4)
 
#define RCIN_RPI_DMA_NO_WIDE_BURSTS   (1<<26)
 
#define RCIN_RPI_DMA_WAIT_RESP   (1<<3)
 
#define RCIN_RPI_DMA_D_DREQ   (1<<6)
 
#define RCIN_RPI_DMA_PER_MAP(x)   ((x)<<16)
 
#define RCIN_RPI_DMA_END   (1<<1)
 
#define RCIN_RPI_DMA_RESET   (1<<31)
 
#define RCIN_RPI_DMA_INT   (1<<2)
 
#define RCIN_RPI_DMA_CS   (0x00/4)
 
#define RCIN_RPI_DMA_CONBLK_AD   (0x04/4)
 
#define RCIN_RPI_DMA_DEBUG   (0x20/4)
 
#define RCIN_RPI_PCM_CS_A   (0x00/4)
 
#define RCIN_RPI_PCM_FIFO_A   (0x04/4)
 
#define RCIN_RPI_PCM_MODE_A   (0x08/4)
 
#define RCIN_RPI_PCM_RXC_A   (0x0c/4)
 
#define RCIN_RPI_PCM_TXC_A   (0x10/4)
 
#define RCIN_RPI_PCM_DREQ_A   (0x14/4)
 
#define RCIN_RPI_PCM_INTEN_A   (0x18/4)
 
#define RCIN_RPI_PCM_INT_STC_A   (0x1c/4)
 
#define RCIN_RPI_PCM_GRAY   (0x20/4)
 
#define RCIN_RPI_PCMCLK_CNTL   38
 
#define RCIN_RPI_PCMCLK_DIV   39
 

Variables

const AP_HAL::HALhal
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 

Macro Definition Documentation

◆ debug

#define debug (   fmt,
  args ... 
)

Definition at line 31 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::_timer_tick().

◆ PPM_INPUT_RPI

#define PPM_INPUT_RPI   RPI_GPIO_5

Definition at line 40 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init().

◆ RCIN_RPI_BUFFER_LENGTH

#define RCIN_RPI_BUFFER_LENGTH   8

Definition at line 35 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init(), and Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_CLK_LEN

#define RCIN_RPI_CLK_LEN   0xA8

Definition at line 60 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_registers().

◆ RCIN_RPI_DMA_CHANNEL

#define RCIN_RPI_DMA_CHANNEL   0

◆ RCIN_RPI_DMA_CONBLK_AD

#define RCIN_RPI_DMA_CONBLK_AD   (0x04/4)

◆ RCIN_RPI_DMA_CS

#define RCIN_RPI_DMA_CS   (0x00/4)

Definition at line 74 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_DMA(), and Linux::RCInput_RPI::stop_dma().

◆ RCIN_RPI_DMA_D_DREQ

#define RCIN_RPI_DMA_D_DREQ   (1<<6)

Definition at line 68 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_DMA_DEBUG

#define RCIN_RPI_DMA_DEBUG   (0x20/4)

Definition at line 76 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_DMA().

◆ RCIN_RPI_DMA_DEST_INC

#define RCIN_RPI_DMA_DEST_INC   (1<<4)

Definition at line 65 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_DMA_END

#define RCIN_RPI_DMA_END   (1<<1)

Definition at line 70 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_DMA().

◆ RCIN_RPI_DMA_INT

#define RCIN_RPI_DMA_INT   (1<<2)

Definition at line 72 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_DMA().

◆ RCIN_RPI_DMA_LEN

#define RCIN_RPI_DMA_LEN   0x1000

Definition at line 59 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_registers().

◆ RCIN_RPI_DMA_NO_WIDE_BURSTS

#define RCIN_RPI_DMA_NO_WIDE_BURSTS   (1<<26)

Definition at line 66 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_DMA_PER_MAP

#define RCIN_RPI_DMA_PER_MAP (   x)    ((x)<<16)

Definition at line 69 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_DMA_RESET

#define RCIN_RPI_DMA_RESET   (1<<31)

Definition at line 71 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_DMA().

◆ RCIN_RPI_DMA_SRC_INC

#define RCIN_RPI_DMA_SRC_INC   (1<<8)

Definition at line 64 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_DMA_WAIT_RESP

#define RCIN_RPI_DMA_WAIT_RESP   (1<<3)

Definition at line 67 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_GPIO_LEV0_ADDR

#define RCIN_RPI_GPIO_LEV0_ADDR   0x7e200034

Definition at line 58 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

◆ RCIN_RPI_MAX_COUNTER

#define RCIN_RPI_MAX_COUNTER   1300

Definition at line 38 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::_timer_tick().

◆ RCIN_RPI_MAX_SIZE_LINE

#define RCIN_RPI_MAX_SIZE_LINE   50

Definition at line 47 of file RCInput_RPI.cpp.

◆ RCIN_RPI_PCM_CS_A

#define RCIN_RPI_PCM_CS_A   (0x00/4)

Definition at line 78 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_PCM().

◆ RCIN_RPI_PCM_DREQ_A

#define RCIN_RPI_PCM_DREQ_A   (0x14/4)

Definition at line 83 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_PCM().

◆ RCIN_RPI_PCM_FIFO_A

#define RCIN_RPI_PCM_FIFO_A   (0x04/4)

Definition at line 79 of file RCInput_RPI.cpp.

◆ RCIN_RPI_PCM_GRAY

#define RCIN_RPI_PCM_GRAY   (0x20/4)

Definition at line 86 of file RCInput_RPI.cpp.

◆ RCIN_RPI_PCM_INT_STC_A

#define RCIN_RPI_PCM_INT_STC_A   (0x1c/4)

Definition at line 85 of file RCInput_RPI.cpp.

◆ RCIN_RPI_PCM_INTEN_A

#define RCIN_RPI_PCM_INTEN_A   (0x18/4)

Definition at line 84 of file RCInput_RPI.cpp.

◆ RCIN_RPI_PCM_LEN

#define RCIN_RPI_PCM_LEN   0x24

Definition at line 61 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_registers().

◆ RCIN_RPI_PCM_MODE_A

#define RCIN_RPI_PCM_MODE_A   (0x08/4)

Definition at line 80 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_PCM().

◆ RCIN_RPI_PCM_RXC_A

#define RCIN_RPI_PCM_RXC_A   (0x0c/4)

Definition at line 81 of file RCInput_RPI.cpp.

◆ RCIN_RPI_PCM_TXC_A

#define RCIN_RPI_PCM_TXC_A   (0x10/4)

Definition at line 82 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_PCM().

◆ RCIN_RPI_PCMCLK_CNTL

#define RCIN_RPI_PCMCLK_CNTL   38

Definition at line 88 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_PCM().

◆ RCIN_RPI_PCMCLK_DIV

#define RCIN_RPI_PCMCLK_DIV   39

Definition at line 89 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_PCM().

◆ RCIN_RPI_RPI1_CLK_BASE

#define RCIN_RPI_RPI1_CLK_BASE   0x20101000

Definition at line 51 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::set_physical_addresses().

◆ RCIN_RPI_RPI1_DMA_BASE

#define RCIN_RPI_RPI1_DMA_BASE   0x20007000

Definition at line 50 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::set_physical_addresses().

◆ RCIN_RPI_RPI1_PCM_BASE

#define RCIN_RPI_RPI1_PCM_BASE   0x20203000

Definition at line 52 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::set_physical_addresses().

◆ RCIN_RPI_RPI2_CLK_BASE

#define RCIN_RPI_RPI2_CLK_BASE   0x3F101000

Definition at line 55 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::set_physical_addresses().

◆ RCIN_RPI_RPI2_DMA_BASE

#define RCIN_RPI_RPI2_DMA_BASE   0x3F007000

Definition at line 54 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::set_physical_addresses().

◆ RCIN_RPI_RPI2_PCM_BASE

#define RCIN_RPI_RPI2_PCM_BASE   0x3F203000

Definition at line 56 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::set_physical_addresses().

◆ RCIN_RPI_SAMPLE_FREQ

#define RCIN_RPI_SAMPLE_FREQ   500

◆ RCIN_RPI_TIMER_BASE

#define RCIN_RPI_TIMER_BASE   0x7e003004

Definition at line 62 of file RCInput_RPI.cpp.

Referenced by Linux::RCInput_RPI::init_ctrl_data().

Variable Documentation

◆ hal

const AP_HAL::HAL& hal

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

Definition at line 14 of file AC_PID_test.cpp.