📄 ics_dev.h
字号:
/*************************************************************************** ics.h - ICS-5x4 driver ------------------- begin : 2003 authors : Linus Gasser emails : linus.gasser@epfl.ch ***************************************************************************//*************************************************************************** * * * 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 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifndef ICS_DEV_H__#define ICS_DEV_H__#include "antenna.h"extern int number_channels;#define ADA_PER_BOARD 4struct ics_dev { swr_ant_param_t *params[ADA_PER_BOARD]; struct pci_dev *dev; void *iobase[6]; unsigned long hwbase[6]; unsigned int iosize[6]; unsigned long iotype[6]; int iomapped[6]; pthread_mutex_t mutex; int flags; int irq; // Number of DACs used int number_channels; // Block size in symbols u32 block_size; // Frame size in blocks u32 blocks_per_frame; u64 block_count; u64 frame_count;};extern struct ics_dev board_tx;extern struct ics_dev board_rx;#define ICS_VENDOR 0x11E3#define ICS_DEVICE 0x0006#define ICS_SUB_VEN 0x1464#define ICS_SUB_DEV_564 0x0564#define ICS_SUB_DEV_554 0x0554#define rtl_udelay(x) rtl_delay((x)*1000)// Refer to the manual for the ICS564. This gives an output-sampling// rate of 200MS/s at a carrier-frequency of 70MHz with an input-sample// rate of 5CMS/s (ComplexMegaSamples/second)#define PLL_MULT 0x4#define CARRIER_MHZ 21.4#define CARRIER_FREQUENCY_23 0x1dddddddU*2#define CARRIER_FREQUENCY_25n 0x1fffffffU*2#define CARRIER_FREQUENCY_25 0x20000000U*2#define CARRIER_FREQUENCY_70 0x59999999U*2#define CIC_INTERPOLATION 0x5#define BOARD_BLOCK_SIZE 16#define SAMPLE_PERIOD_NS 500#define RF_SYNCH_IN 25#define RF_SYNCH_R 40#define RF_SYNCH_N(f_out) ( (f_out) * RF_SYNCH_R / RF_SYNCH_IN / 2 )/** * Initialises the ics-driver * * @return 0 for OK, -1 for error */int init_dev( void );int swr_init_dev( void );int ics_get_board ( struct ics_dev *board, unsigned int device, unsigned int (*irq_handler)(unsigned int, struct pt_regs *) );/** * Cleans up the driver - mostly iounmaps the memories */void clean_dev( void );#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -