Exemple #1
0
	READ_TARGET_FUNCNAME(hcs12)
};

VSS_HANDLER(hcs12_help)
{
	VSS_CHECK_ARGC(1);
	PRINTF("Usage of %s:"LOG_LINE_END, CUR_TARGET_STRING);
	PRINTF("  -m,  --mode <MODE>                        set mode<r|p>"LOG_LINE_END);
	PRINTF(LOG_LINE_END);
	return VSFERR_NONE;
}

const struct vss_cmd_t hcs12_notifier[] =
{
	VSS_CMD(	"help",
				"print help information of current target for internal call",
				hcs12_help,
				NULL),
	VSS_CMD_END
};



#define reset_init()			prog->gpio.init(0)
#define reset_fini()			prog->gpio.fini(0)
#define reset_output()			\
	prog->gpio.config(0, SWIM_RST_PIN, SWIM_RST_PIN, 0, 0)
#define reset_input()			\
	prog->gpio.config(0, SWIM_RST_PIN, 0, SWIM_RST_PIN, SWIM_RST_PIN)
#define reset_set()				reset_input()
#define reset_clr()				reset_output()
#define bdm_output()			\
Exemple #2
0
		target_slot[target_slotnum].script_base =
			target_slot[target_slotnum].data_base + target_slot[target_slotnum].data_size;
		target_slot[target_slotnum].script_size = EVSPROG_SCRIPT_SIZE;
		target_slotnum++;
	}
#endif
	return VSFERR_NONE;
}

VSS_HANDLER(target_data_set_base);
VSS_HANDLER(target_select_slot);

static const struct vss_cmd_t target_data_cmd[] =
{
	VSS_CMD(	"set_base",
				"set base of target data, format: set_base ADDR",
				target_data_set_base,
				NULL),
	VSS_CMD(	"select_slot",
				"select target slot, format: select_slot INDEX",
				target_select_slot,
				NULL),
	VSS_CMD_END
};
struct vss_cmd_list_t target_data_cmd_list =
							VSS_CMD_LIST("target_data", target_data_cmd);

static uint32_t TARGET_DATA_ADDR;
VSS_HANDLER(target_data_set_base)
{
	uint32_t temp_addr;
	
Exemple #3
0
#include "app_type.h"
#include "app_io.h"
#include "app_log.h"
#include "app_err.h"

#include "scripts.h"
#include "strparser.h"

#include "usbapi.h"

VSS_HANDLER(usbapi_param);
static const struct vss_cmd_t usbapi_cmd[] =
{
	VSS_CMD(	"usb",
				"set usb device, format: "
				"usb/U [VID_PID_EPIN_EPOUT_INTERFACE|TYPESTRING]SERIALSTRING",
				usbapi_param,
				NULL),
	VSS_CMD(	"U",
				"set usb device, format: "
				"usb/U [VID_PID_EPIN_EPOUT_INTERFACE|TYPESTRING]SERIALSTRING",
				usbapi_param,
				NULL),
	VSS_CMD_END
};
struct vss_cmd_list_t usbapi_cmd_list = VSS_CMD_LIST("usbapi", usbapi_cmd);

VSS_HANDLER(usbapi_param)
{
	// vid: 2 bytes
	// pid: 2 bytes
Exemple #4
0
VSS_HANDLER(vsprog_mass);
VSS_HANDLER(vsprog_free_all);
VSS_HANDLER(vsprog_init);
VSS_HANDLER(vsprog_select_slot);
VSS_HANDLER(vsprog_info);
VSS_HANDLER(vsprog_program);
VSS_HANDLER(vsprog_auto_program);

VSS_HANDLER(vsprog_wait_key_down);
VSS_HANDLER(vsprog_wait_key_up);
VSS_HANDLER(vsprog_wait_key_press);

static const struct vss_cmd_t vsprog_key_cmd[] =
{
	VSS_CMD(	"wait_down",
				"wait key pushed down, format: key.wait_down",
				vsprog_wait_key_down,
				NULL),
	VSS_CMD(	"wait_up",
				"wait key released, format: key.wait_up",
				vsprog_wait_key_up,
				NULL),
	VSS_CMD(	"wait_press",
				"wait key pressed, format: key.wait_press",
				vsprog_wait_key_press,
				NULL),
	VSS_CMD_END
};

static const struct vss_cmd_t vsprog_cmd[] =
{
	VSS_CMD(	"help",
Exemple #5
0
#if TARGET_COMISP_EN
VSS_HANDLER(stm32f2_extra)
{
	char cmd[2];
	
	VSS_CHECK_ARGC(1);
	cmd[0] = '0' + COMISP_STM32F2;
	cmd[1] = '\0';
	return vss_call_notifier(comisp_notifier, "E", cmd);
}
#endif

const struct vss_cmd_t stm32f4_notifier[] =
{
	VSS_CMD(	"help",
				"print help information of current target for internal call",
				stm32f4_help,
				NULL),
	VSS_CMD(	"mode",
				"set programming mode of target for internal call",
				stm32f2_mode,
				NULL),
#if TARGET_COMISP_EN
	VSS_CMD(	"extra",
				"print extra information for internal call",
				stm32f2_extra,
				NULL),
#endif
	VSS_CMD_END
};

const struct vss_cmd_t stm32f2_notifier[] =
Exemple #6
0
#include "interfaces.h"
#include "scripts.h"
#include "app_script.h"

#include "strparser.h"
#include "dal/mal/mal.h"

#if HW_HAS_BEEPER
VSS_HANDLER(app_beeper_init);
VSS_HANDLER(app_beeper_on);
VSS_HANDLER(app_beeper_off);

static const struct vss_cmd_t beeper_cmd[] =
{
	VSS_CMD(	"init",
				"initialize beeper, format: beeper.init",
				app_beeper_init,
				NULL),
	VSS_CMD(	"on",
				"set beeper on, format: beeper on",
				app_beeper_on,
				NULL),
	VSS_CMD(	"off",
				"set beeper off, format: beeper.off",
				app_beeper_off,
				NULL),
	VSS_CMD_END
};
#endif

#if HW_HAS_7COLOR_LED
VSS_HANDLER(app_led7c_init);
Exemple #7
0
#include "lpcarmisp.h"

#include "comisp_internal.h"

#include "comport.h"

#define CUR_TARGET_STRING			COMISP_STRING

VSS_HANDLER(comisp_comm);
VSS_HANDLER(comisp_print_cominfo);

static const struct vss_cmd_t comisp_cmd[] =
{
	VSS_CMD(	"comport",
				"set com port, format: "
				"comport/C COM_BAUDRATE_DATALEN_PARITY_STOP_HANDSHAKE_EXTRA",
				comisp_comm,
				NULL),
	VSS_CMD(	"C",
				"set com port, format: "
				"comport/C COM_BAUDRATE_DATALEN_PARITY_STOP_HANDSHAKE_EXTRA",
				comisp_comm,
				NULL),
	VSS_CMD_END
};
struct vss_cmd_list_t comisp_cmd_list = VSS_CMD_LIST("comisp", comisp_cmd);

ENTER_PROGRAM_MODE_HANDLER(comisp);
LEAVE_PROGRAM_MODE_HANDLER(comisp);
struct program_functions_t comisp_program_functions;
Exemple #8
0
#include "versaloon_include.h"
#include "versaloon.h"
#include "versaloon_internal.h"
#include "usbtoxxx/usbtoxxx.h"
#include "usbtoxxx/usbtoxxx_internal.h"

#include "versaloon_libusb.h"

#define VERSALOON_STRING					"versaloon"

VSS_HANDLER(versaloon_support);
VSS_HANDLER(versaloon_help);
const struct vss_cmd_t versaloon_notifier[] =
{
	VSS_CMD(	"support",
				"print support information, format: support/S",
				versaloon_support,
				NULL),
	VSS_CMD(	"S",
				"print support information, format: support/S",
				versaloon_support,
				NULL),
	VSS_CMD(	"help",
				"print help information, format: help/h",
				versaloon_help,
				NULL),
	VSS_CMD(	"h",
				"print help information, format: help/h",
				versaloon_help,
				NULL),
	VSS_CMD_END
};
Exemple #9
0
#include "dal/usart_stream/usart_stream.h"

#include "usb_protocol.h"

#include "vsprog/target/target_data.h"

#if HW_HAS_LCM
#include "vsprog_ui.h"
#endif

VSS_HANDLER(appio_set_dummy);

static const struct vss_cmd_t appio_cmd[] =
{
	VSS_CMD(	"dummy",
				"set dummy mode of appio, format: appio.dummy DUMMY",
				appio_set_dummy,
				NULL),
	VSS_CMD_END
};
struct vss_cmd_list_t appio_cmd_list =
							VSS_CMD_LIST("appio", appio_cmd);

#if APPIO_DUMMY
static bool appio_dummy = true;
#else
static bool appio_dummy = false;
#endif

VSS_HANDLER(appio_set_dummy)
{
	VSS_CHECK_ARGC(2);
Exemple #10
0
	{
	case EE93CX6_MODE_BYTE:
	case EE93CX6_MODE_WORD:
		ee93cx6_origination_mode = mode;
		break;
	default:
		return VSFERR_FAIL;
		break;
	}
	return VSFERR_NONE;
}

const struct vss_cmd_t ee93cx6_notifier[] =
{
	VSS_CMD(	"help",
				"print help information of current target for internal call",
				ee93cx6_help,
				NULL),
	VSS_CMD(	"mode",
				"set programming mode of target for internal call",
				ee93cx6_mode,
				NULL),
	VSS_CMD_END
};






static struct ee93cx6_drv_param_t ee93cx6_drv_param;
static struct ee93cx6_drv_interface_t ee93cx6_drv_ifs;