return ERROR_OK;
}
-static int_least32_t cmsis_dap_swd_frequency(int_least32_t hz)
-{
- if (hz > 0)
- cmsis_dap_speed(hz / 1000);
-
- return hz;
-}
-
-
COMMAND_HANDLER(cmsis_dap_handle_info_command)
{
if (cmsis_dap_get_version_info() == ERROR_OK)
static const struct swd_driver cmsis_dap_swd_driver = {
.init = cmsis_dap_swd_init,
- .frequency = cmsis_dap_swd_frequency,
.switch_seq = cmsis_dap_swd_switch_seq,
.read_reg = cmsis_dap_swd_read_reg,
.write_reg = cmsis_dap_swd_write_reg,
ftdi_swd_queue_cmd(cmd, NULL, value, ap_delay_clk);
}
-static int_least32_t ftdi_swd_frequency(int_least32_t hz)
-{
- if (hz > 0)
- freq = mpsse_set_frequency(mpsse_ctx, hz);
-
- return freq;
-}
-
static int ftdi_swd_switch_seq(enum swd_special_seq seq)
{
switch (seq) {
static const struct swd_driver ftdi_swd = {
.init = ftdi_swd_init,
- .frequency = ftdi_swd_frequency,
.switch_seq = ftdi_swd_switch_seq,
.read_reg = ftdi_swd_read_reg,
.write_reg = ftdi_swd_write_reg,
jlink_swd_queue_cmd(cmd, value, 0, ap_delay_clk);
}
-static int_least32_t jlink_swd_frequency(int_least32_t hz)
-{
- if (hz > 0)
- jlink_speed(hz / 1000);
-
- return hz;
-}
-
/***************************************************************************/
/* J-Link tap functions */
static const struct swd_driver jlink_swd = {
.init = &jlink_swd_init,
- .frequency = &jlink_swd_frequency,
.switch_seq = &jlink_swd_switch_seq,
.read_reg = &jlink_swd_read_reg,
.write_reg = &jlink_swd_write_reg,
static const struct swd_driver vsllink_swd_driver = {
.init = vsllink_swd_init,
- .frequency = vsllink_swd_frequency,
.switch_seq = vsllink_swd_switch_seq,
.read_reg = vsllink_swd_read_reg,
.write_reg = vsllink_swd_write_reg,
return ERROR_OK;
}
-static int_least32_t xds110_swd_frequency(int_least32_t hz)
-{
- if (hz > 0)
- xds110_speed(hz / 1000);
- return hz;
-}
-
COMMAND_HANDLER(xds110_handle_info_command)
{
xds110_show_info();
static const struct swd_driver xds110_swd_driver = {
.init = xds110_swd_init,
- .frequency = xds110_swd_frequency,
.switch_seq = xds110_swd_switch_seq,
.read_reg = xds110_swd_read_reg,
.write_reg = xds110_swd_write_reg,
*/
int (*init)(void);
- /**
- * Set the SWCLK frequency of the SWD link.
- *
- * The driver should round the desired value, downwards if possible, to
- * the nearest supported frequency. A negative value should be ignored
- * and can be used to query the current setting. If the driver does not
- * support a variable frequency a fixed, nominal, value should be
- * returned.
- *
- * If the frequency is increased, it must not apply before the currently
- * queued transactions are executed. If the frequency is lowered, it may
- * apply immediately.
- *
- * @param hz The desired frequency in Hz.
- * @return The actual resulting frequency after rounding.
- */
- int_least32_t (*frequency)(int_least32_t hz);
-
/**
* Queue a special SWDIO sequence.
*