code refactoring
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#ifndef _DRV_LOADER_H
|
||||
#define _DRV_LOADER_H
|
||||
/*
|
||||
* JTAG Core library
|
||||
* Copyright (c) 2008 - 2024 Viveris Technologies
|
||||
@@ -22,29 +24,9 @@
|
||||
* @brief driver functions definitions
|
||||
* @author Jean-François DEL NERO <Jean-Francois.DELNERO@viveris.fr>
|
||||
*/
|
||||
|
||||
enum {
|
||||
GET_DRV_ID = 1,
|
||||
GET_DRV_DESCRIPTION,
|
||||
GET_DRV_FUNCPTR,
|
||||
GET_DRV_DETECT
|
||||
};
|
||||
|
||||
typedef int (*DRV_DETECT) (void* jtag_core);
|
||||
typedef int (*DRV_INIT) (void* jtag_core,int sub_drv,char * params);
|
||||
typedef int (*DRV_TXRXDATA) (void* jtag_core, unsigned char * str_out, unsigned char * str_in, int size);
|
||||
typedef int (*DRV_TXTMS) (void* jtag_core, unsigned char * str_out, int size);
|
||||
typedef int (*DRV_GETMODULEINFOS) (void* jtag_core,int sub_drv,unsigned int infotype, void * returnvalue);
|
||||
typedef int (*DRV_DEINIT) (void* jtag_core);
|
||||
#include "config/bs_defines.h"
|
||||
|
||||
typedef struct drv_ptr_
|
||||
{
|
||||
DRV_DETECT drv_Detect;
|
||||
DRV_INIT drv_Init;
|
||||
DRV_DEINIT drv_DeInit;
|
||||
DRV_TXTMS drv_TX_TMS;
|
||||
DRV_TXRXDATA drv_TXRX_DATA;
|
||||
DRV_GETMODULEINFOS drv_Get_ModInfos;
|
||||
} drv_ptr;
|
||||
int GetDrvInfo(void * jc_ctx, unsigned long infotype, void * returnvalue, const char * drv_id, const char * drv_desc, drv_ptr * drv_func);
|
||||
|
||||
int GetDrvInfo(void * jc_ctx, unsigned long infotype, void * returnvalue, const char * drv_id, const char * drv_desc, drv_ptr * drv_func);
|
||||
#endif
|
||||
Reference in New Issue
Block a user