#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <asm/elphel/c313a.h>
#include <asm/elphel/autoexp.h>
#include <asm/elphel/fpgaclocks.h>
#include <asm/elphel/fpgaconfa.h>
Include dependency graph for fpcf.c:
Go to the source code of this file.
Defines | |
#define | SUPPORTED_IN_72 0 |
#define | X313__RA__STATUS 0x10 |
#define | X313_WA_DCM 8 |
#define | X313_SR__DCM_OVFL 22 |
#define | X313_SR__DCM_LOCKED 21 |
#define | X313_SR__DCM_RDY 20 |
#define | X313_SR__DCM_EARLY 19 |
#define | X313_SR__DCM_LATE 18 |
#define | IS_DCM_OVFL(x) ( x & (1 << X313_SR__DCM_OVFL )) |
#define | IS_DCM_LOCK(x) ( x & (1 << X313_SR__DCM_LOCKED )) |
#define | IS_DCM_RDY(x) ( x & (1 << X313_SR__DCM_RDY )) |
#define | DCM_ERR(x) (( x >> X313_SR__DCM_LATE ) & 3) |
#define | IS_DCM_GOOD(x) (IS_DCM_LOCK(x) && IS_DCM_RDY(x) && !(IS_DCM_OVFL(x))) |
#define | CLOCK_LOW 20 |
#define | CLOCK_HIGH 127 |
#define | CY22393_SA 0xd2 |
#define | LSEEK_FSDRAM_RESET 0x01 |
#define | FPCF_SDBUFFER_SIZE 0x800 |
#define | DCM_RETRY 100 |
#define | phase_noise_margin 5 |
Functions | |
int | readSDRAMdummy (void) |
int | resetSDRAM (void) |
void | usleepFPGA (int devfd, int dly) |
int | main (int argc, char *argv[]) |
Variables | |
static char * | usage |
static char * | short_usage = "Use fpcf -help for options\n" |
#define DCM_RETRY 100 |
Referenced by main().
#define LSEEK_FSDRAM_RESET 0x01 |
#define phase_noise_margin 5 |
#define SUPPORTED_IN_72 0 |
*************************************************************************** ! FILE NAME : fpcf.c ! DESCRIPTION: A big set of different FPGA-related commands ! Copyright (C) 2002-2007 Elphel, Inc. ! -----------------------------------------------------------------------------** ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** !
int main | ( | int | argc, | |
char * | argv[] | |||
) |
*************************************************************************** ! FILE NAME : autoexposure.c ! DESCRIPTION: Daemon to adjust camera exposure and white balance ! Copyright (C) 2008 Elphel, Inc. ! -----------------------------------------------------------------------------** ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** ! !
define X313_CHN_DISALL_D 0xaa0 // disable all channels, do not modify refresh or memory as a whole define X313_SDRAM_OFF_D 0xaaa // disable all chennels, refresh and memory itself define X313_SDRAM_ON_D 0xaaf // will disable all channels but refresh
test system memory - now - just for intereference, not a real memory test
allocate memory
deallocate memory
Definition at line 331 of file fpcf.c.
References _CCCMD, a, AUTOEXP_DEV_NAME, CCAM_WPARS, CLOCK_HIGH, CLOCK_LOW, CMOSCAM_IOCTYPE, CY22393_SA, d, DCM_ERR, DCM_RETRY, f, FPCF_SDBUFFER_SIZE, FPGA_CLOCK_I2C_READREG, FPGA_CLOCK_I2C_WRITEREG, FPGA_CLOCK_IOCTYPE, FPGA_CLOCK_IOCTYPE_RD, FPGA_JTAG, FPGA_JTAG_ARG, FPGA_PA_RD, FPGA_PA_WR, FPGA_PGM, FPGA_STAT, FPGACONF_CANON_IOBYTE, FPGACONF_CONTROL_REG, FPGACONF_CR_MODIFY, FPGACONF_CR_SHADOW, FPGACONF_CR_SHADOW1, FPGACONF_GETSTATE, FPGACONF_IOCTYPE, FPGACONF_RD_WAITSTATES, FPGACONF_READ_CAPTURE, FPGACONF_READREG, FPGACONF_READREG4, FPGACONF_READREG_H, FPGACONF_READREG_H4, FPGACONF_READREG_L, FPGACONF_READREG_L4, FPGACONF_START_CAPTURE, FPGACONF_WR_WAITSTATES, FPGACONF_WRITEREG, FPGACONF_WRITEREG4, free(), I2C_READARG, I2C_WRITEARG, IO_CCAM_DMA, IO_CCAM_JPEG, IO_CCAM_JPEG_CTRL, IO_CCAM_JPEG_GET_L, IO_CCAM_JPEG_GET_N, IOC_AUTOEXP_GAMMA_TABLE, IS_DCM_GOOD, IS_DCM_LOCK, malloc(), n, P_CLK_FPGA, P_CLK_SENSOR, read, readSDRAMdummy(), resetSDRAM(), sa, short_usage, state, usage, write, X313__RA__STATUS, X313_WA_DCM, and xa0.
int readSDRAMdummy | ( | void | ) |
int resetSDRAM | ( | void | ) |
Definition at line 295 of file fpcf.c.
References LSEEK_FSDRAM_RESET, and SEEK_END.
Referenced by main().
void usleepFPGA | ( | int | devfd, | |
int | dly | |||
) |
char* short_usage = "Use fpcf -help for options\n" [static] |