Files
bs_explorer/modules/script/script.h
François Dausseur 5dfe5b123e compiles and works
2025-02-18 11:36:18 +01:00

56 lines
1.9 KiB
C

#ifndef _SCRIPT_H
#define _SCRIPT_H
/*
* JTAG Boundary Scanner
* Copyright (c) 2008 - 2024 Viveris Technologies
*
* JTAG Boundary Scanner 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.0 of the License, or (at your option) any later version.
*
* JTAG Boundary Scanner 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 version 3 for more details.
*
* You should have received a copy of the GNU General Public License
* along with JTAG Boundary Scanners; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file script.h
* @brief JTAG Boundary Scanner scripts support header file.
* @author Jean-François DEL NERO <Jean-Francois.DELNERO@viveris.fr>
*/
#include "config/bs_defines.h"
typedef int (* CMD_FUNC)( script_ctx * ctx, char * line);
typedef struct cmd_list_
{
const char * command;
CMD_FUNC func;
const char ** help;
}cmd_list;
typedef struct label_list_
{
char * label;
unsigned int file_offset;
}label_list;
extern cmd_list script_commands_list[];
script_ctx *jtagcore_initScript(jtag_core *jc);
script_ctx * init_script(void * app_ctx, unsigned int flags, void * env);
int execute_file_script( script_ctx * ctx, char * filename );
int execute_line_script( script_ctx * ctx, char * line );
int execute_ram_script( script_ctx * ctx, unsigned char * script_buffer, int buffersize );
void setOutputFunc_script( script_ctx * ctx, SCRIPT_PRINTF_FUNC ext_printf );
script_ctx * deinit_script(script_ctx * ctx);
int jtagcore_savePinsStateScript(jtag_core *jc, int device, char *script_path);
#endif