Skip to content

Commit

Permalink
adapter: make adapter_config_khz() static
Browse files Browse the repository at this point in the history
The function is not referenced outside the file.
Make it static.

Change-Id: I72e96624749ae4cc7f4566d737a88186e899616a
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/8541
Tested-by: jenkins
  • Loading branch information
borneoa committed Nov 23, 2024
1 parent 989e9e8 commit 2465f18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/jtag/adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ static const struct gpio_map {
[ADAPTER_GPIO_IDX_LED] = { "led", ADAPTER_GPIO_DIRECTION_OUTPUT, true, true, },
};

static int adapter_config_khz(unsigned int khz);

bool is_adapter_initialized(void)
{
return adapter_config.adapter_initialized;
Expand Down Expand Up @@ -245,7 +247,8 @@ static int adapter_set_speed(int speed)
return is_adapter_initialized() ? adapter_driver->speed(speed) : ERROR_OK;
}

int adapter_config_khz(unsigned int khz)
/** Attempt to configure the adapter for the specified kHz. */
static int adapter_config_khz(unsigned int khz)
{
LOG_DEBUG("handle adapter khz");
adapter_config.clock_mode = CLOCK_MODE_KHZ;
Expand Down
3 changes: 0 additions & 3 deletions src/jtag/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ int adapter_get_speed(int *speed);
*/
int adapter_get_speed_readable(int *speed);

/** Attempt to configure the adapter for the specified kHz. */
int adapter_config_khz(unsigned int khz);

/**
* Attempt to enable RTCK/RCLK. If that fails, fallback to the
* specified frequency.
Expand Down

0 comments on commit 2465f18

Please sign in to comment.