📄 aml_tdi_driver.h
字号:
#ifndef _AML_TDI_DRIVER_H_
#define _AML_TDI_DRIVER_H_
#include <drivers/usb/core/usb.h>
/* only one should be define to 1 */
//#define PROJECT_HOST_ONLY 1
//#define PROJECT_DUAL_ROLE 0
//#define PROJECT_PHERIPH_ONLY 0
/* the start of fifo memory
* 0x1000 if 242 work as peripheral only
* 0x1000+0x400 if 242 work as host and peripheral
*/
#define PERI_FIFO_LENGTH (512)
#define PERI_FIFO_END (0x2000)
#define PERI_FIFO_START (PERI_FIFO_END - PERI_FIFO_LENGTH)
#define T1120MEM_START (0x1000) /* Data memory */
#define T1120MEM_SIZE (PERI_FIFO_START - T1120MEM_START) /* size of host controller data memory */
/*#define PROJECT_BIG_ENDIAN 1*/
/**
* This structure is a wrapper that encapsulates the driver components used to
* manage a single tdi controller (both 1120 and 242).
*/
typedef struct tdi_controller
{
/** Base address returned from ioremap() */
void *base;
// struct lm_device *lmdev;
struct platform_device *pdev;
/** Pointer to the PCD structure. */
void *fc_controller;
/** Pointer to the HCD structure. */
void *hc_controller;
/** Function interrupt handler */
void (*fc_handler) (void *fc);
/** Host interrupt handler */
void (*hc_handler) (void *hc);
/** HNP interrupt handler */
void (*hnp_handler) (void *controller);
/** Flag to indicate whether the common IRQ handler is installed. */
unsigned char common_irq_installed;
/* handle returned by requestirq */
int irq_handle;
} tdi_controller_t;
/* Public APIs */
void aml_tdi_remove(platform_device_t * pdev);
int aml_tdi_probe(platform_device_t * pdev);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -