code refactoring
This commit is contained in:
@@ -23,9 +23,6 @@
|
||||
* @author Jean-François DEL NERO <Jean-Francois.DELNERO@viveris.fr>
|
||||
*/
|
||||
|
||||
#include "drv_loader.h"
|
||||
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef _DRIVERS_LIST_H
|
||||
#define _DRIVERS_LIST_H
|
||||
/*
|
||||
* JTAG Core library
|
||||
* Copyright (c) 2008 - 2024 Viveris Technologies
|
||||
@@ -30,4 +32,4 @@ typedef struct _drv_entry
|
||||
|
||||
extern const drv_entry staticdrvs[];
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "drv_loader.h"
|
||||
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
@@ -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
|
||||
@@ -31,10 +31,9 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include "../drv_loader.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "script/env.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
#include "os_interface/os_interface.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef _FTDI_JTAG_DRV_H
|
||||
#define _FTDI_JTAG_DRV_H
|
||||
/*
|
||||
* JTAG Core library
|
||||
* Copyright (c) 2008 - 2024 Viveris Technologies
|
||||
@@ -23,4 +25,8 @@
|
||||
* @author Jean-François DEL NERO <Jean-Francois.DELNERO@viveris.fr>
|
||||
*/
|
||||
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
int drv_FTDI_libGetDrv(jtag_core * jc,int sub_drv, unsigned int infotype,void * returnvalue);
|
||||
|
||||
#endif
|
||||
@@ -25,12 +25,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "../drv_loader.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
|
||||
#include "script/env.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef _JLINK_JTAG_DRV_H
|
||||
#define _JLINK_JTAG_DRV_H
|
||||
/*
|
||||
* JTAG Core library
|
||||
* Copyright (c) 2008 - 2024 Viveris Technologies
|
||||
@@ -23,4 +25,8 @@
|
||||
* @author Jean-François DEL NERO <Jean-Francois.DELNERO@viveris.fr>
|
||||
*/
|
||||
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
int drv_JLINK_libGetDrv(jtag_core * jc,int sub_drv, unsigned int infotype,void * returnvalue);
|
||||
|
||||
#endif
|
||||
@@ -34,14 +34,10 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "../drv_loader.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "script/env.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "os_interface/os_interface.h"
|
||||
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
char linux_gpio_base[512];
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef _GPIO_JTAG_DRV_H
|
||||
#define _GPIO_JTAG_DRV_H
|
||||
/*
|
||||
* JTAG Core library
|
||||
* Copyright (c) 2008 - 2024 Viveris Technologies
|
||||
@@ -23,4 +25,8 @@
|
||||
* @author Jean-François DEL NERO <Jean-Francois.DELNERO@viveris.fr>
|
||||
*/
|
||||
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
int drv_LinuxGPIO_libGetDrv(jtag_core * jc,int sub_drv,unsigned int infotype,void * returnvalue);
|
||||
|
||||
#endif
|
||||
@@ -32,12 +32,9 @@
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#include "../drv_loader.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "script/env.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef _LPT_JTAG_DRV_H
|
||||
#define _LPT_JTAG_DRV_H
|
||||
/*
|
||||
* JTAG Core library
|
||||
* Copyright (c) 2008 - 2024 Viveris Technologies
|
||||
@@ -24,3 +26,5 @@
|
||||
*/
|
||||
|
||||
int drv_LPT_libGetDrv(jtag_core * jc,int sub_drv,unsigned int infotype,void * returnvalue);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user