jtag: core: make local functions static
The functions: - jtag_error_clear(); - jtag_tap_count(); are not referenced outside the file. Make them static. Change-Id: I00fcf06b1838b9f6c955c19772f1d41d486459e9 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8542 Tested-by: jenkins
This commit is contained in:
parent
2465f18515
commit
f82664ff82
|
@ -51,6 +51,8 @@ static void jtag_add_scan_check(struct jtag_tap *active,
|
||||||
tap_state_t state),
|
tap_state_t state),
|
||||||
int in_num_fields, struct scan_field *in_fields, tap_state_t state);
|
int in_num_fields, struct scan_field *in_fields, tap_state_t state);
|
||||||
|
|
||||||
|
static int jtag_error_clear(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The jtag_error variable is set when an error occurs while executing
|
* The jtag_error variable is set when an error occurs while executing
|
||||||
* the queue. Application code may set this using jtag_set_error(),
|
* the queue. Application code may set this using jtag_set_error(),
|
||||||
|
@ -127,7 +129,11 @@ void jtag_set_error(int error)
|
||||||
jtag_error = error;
|
jtag_error = error;
|
||||||
}
|
}
|
||||||
|
|
||||||
int jtag_error_clear(void)
|
/**
|
||||||
|
* Resets jtag_error to ERROR_OK, returning its previous value.
|
||||||
|
* @returns The previous value of @c jtag_error.
|
||||||
|
*/
|
||||||
|
static int jtag_error_clear(void)
|
||||||
{
|
{
|
||||||
int temp = jtag_error;
|
int temp = jtag_error;
|
||||||
jtag_error = ERROR_OK;
|
jtag_error = ERROR_OK;
|
||||||
|
@ -186,7 +192,7 @@ struct jtag_tap *jtag_all_taps(void)
|
||||||
return __jtag_all_taps;
|
return __jtag_all_taps;
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned int jtag_tap_count(void)
|
static unsigned int jtag_tap_count(void)
|
||||||
{
|
{
|
||||||
struct jtag_tap *t = jtag_all_taps();
|
struct jtag_tap *t = jtag_all_taps();
|
||||||
unsigned int n = 0;
|
unsigned int n = 0;
|
||||||
|
|
|
@ -153,7 +153,6 @@ struct jtag_tap *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *obj);
|
||||||
struct jtag_tap *jtag_tap_by_position(unsigned int abs_position);
|
struct jtag_tap *jtag_tap_by_position(unsigned int abs_position);
|
||||||
struct jtag_tap *jtag_tap_next_enabled(struct jtag_tap *p);
|
struct jtag_tap *jtag_tap_next_enabled(struct jtag_tap *p);
|
||||||
unsigned int jtag_tap_count_enabled(void);
|
unsigned int jtag_tap_count_enabled(void);
|
||||||
unsigned int jtag_tap_count(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* - TRST_ASSERTED triggers two sets of callbacks, after operations to
|
* - TRST_ASSERTED triggers two sets of callbacks, after operations to
|
||||||
|
@ -568,11 +567,6 @@ void jtag_sleep(uint32_t us);
|
||||||
* called with a non-zero error code.
|
* called with a non-zero error code.
|
||||||
*/
|
*/
|
||||||
void jtag_set_error(int error);
|
void jtag_set_error(int error);
|
||||||
/**
|
|
||||||
* Resets jtag_error to ERROR_OK, returning its previous value.
|
|
||||||
* @returns The previous value of @c jtag_error.
|
|
||||||
*/
|
|
||||||
int jtag_error_clear(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if it's safe for a background polling task to access the
|
* Return true if it's safe for a background polling task to access the
|
||||||
|
|
Loading…
Reference in New Issue