driver: mpsse: make local functions static
The functions: - mpsse_divide_by_5_config(); - mpsse_purge(); - mpsse_rtck_config(); - mpsse_set_divisor(); are not referenced outside the file. Make them static. Change-Id: Id6930183a3ce26693b2113f622046168ba289df8 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8544 Tested-by: jenkins
This commit is contained in:
parent
f4ac0c7022
commit
644742b4b2
|
@ -75,6 +75,8 @@ struct mpsse_ctx {
|
||||||
int retval;
|
int retval;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void mpsse_purge(struct mpsse_ctx *ctx);
|
||||||
|
|
||||||
/* Returns true if the string descriptor indexed by str_index in device matches string */
|
/* Returns true if the string descriptor indexed by str_index in device matches string */
|
||||||
static bool string_descriptor_equal(struct libusb_device_handle *device, uint8_t str_index,
|
static bool string_descriptor_equal(struct libusb_device_handle *device, uint8_t str_index,
|
||||||
const char *string)
|
const char *string)
|
||||||
|
@ -421,7 +423,7 @@ bool mpsse_is_high_speed(struct mpsse_ctx *ctx)
|
||||||
return ctx->type != TYPE_FT2232C;
|
return ctx->type != TYPE_FT2232C;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpsse_purge(struct mpsse_ctx *ctx)
|
static void mpsse_purge(struct mpsse_ctx *ctx)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
LOG_DEBUG("-");
|
LOG_DEBUG("-");
|
||||||
|
@ -709,7 +711,7 @@ void mpsse_loopback_config(struct mpsse_ctx *ctx, bool enable)
|
||||||
single_byte_boolean_helper(ctx, enable, 0x84, 0x85);
|
single_byte_boolean_helper(ctx, enable, 0x84, 0x85);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t divisor)
|
static void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t divisor)
|
||||||
{
|
{
|
||||||
LOG_DEBUG("%d", divisor);
|
LOG_DEBUG("%d", divisor);
|
||||||
|
|
||||||
|
@ -726,7 +728,7 @@ void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t divisor)
|
||||||
buffer_write_byte(ctx, divisor >> 8);
|
buffer_write_byte(ctx, divisor >> 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool enable)
|
static int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool enable)
|
||||||
{
|
{
|
||||||
if (!mpsse_is_high_speed(ctx))
|
if (!mpsse_is_high_speed(ctx))
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
|
@ -737,7 +739,7 @@ int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool enable)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mpsse_rtck_config(struct mpsse_ctx *ctx, bool enable)
|
static int mpsse_rtck_config(struct mpsse_ctx *ctx, bool enable)
|
||||||
{
|
{
|
||||||
if (!mpsse_is_high_speed(ctx))
|
if (!mpsse_is_high_speed(ctx))
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
|
|
|
@ -59,9 +59,6 @@ void mpsse_set_data_bits_high_byte(struct mpsse_ctx *ctx, uint8_t data, uint8_t
|
||||||
void mpsse_read_data_bits_low_byte(struct mpsse_ctx *ctx, uint8_t *data);
|
void mpsse_read_data_bits_low_byte(struct mpsse_ctx *ctx, uint8_t *data);
|
||||||
void mpsse_read_data_bits_high_byte(struct mpsse_ctx *ctx, uint8_t *data);
|
void mpsse_read_data_bits_high_byte(struct mpsse_ctx *ctx, uint8_t *data);
|
||||||
void mpsse_loopback_config(struct mpsse_ctx *ctx, bool enable);
|
void mpsse_loopback_config(struct mpsse_ctx *ctx, bool enable);
|
||||||
void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t divisor);
|
|
||||||
int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool enable);
|
|
||||||
int mpsse_rtck_config(struct mpsse_ctx *ctx, bool enable);
|
|
||||||
|
|
||||||
/* Helper to set frequency in Hertz. Returns actual realizable frequency or negative error.
|
/* Helper to set frequency in Hertz. Returns actual realizable frequency or negative error.
|
||||||
* Frequency 0 means RTCK. */
|
* Frequency 0 means RTCK. */
|
||||||
|
@ -69,6 +66,5 @@ int mpsse_set_frequency(struct mpsse_ctx *ctx, int frequency);
|
||||||
|
|
||||||
/* Queue handling */
|
/* Queue handling */
|
||||||
int mpsse_flush(struct mpsse_ctx *ctx);
|
int mpsse_flush(struct mpsse_ctx *ctx);
|
||||||
void mpsse_purge(struct mpsse_ctx *ctx);
|
|
||||||
|
|
||||||
#endif /* OPENOCD_JTAG_DRIVERS_MPSSE_H */
|
#endif /* OPENOCD_JTAG_DRIVERS_MPSSE_H */
|
||||||
|
|
Loading…
Reference in New Issue