Skip to content

Commit a1ae404

Browse files
committed
Made public functions in swd_host_ca.c non-static.
- These functions were (implicitly) declared extern in swd_host.h, then defined as static in swd_host_ca.c.
1 parent 1113dd0 commit a1ae404

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

source/daplink/interface/swd_host_ca.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ static uint32_t soft_reset = SYSRESETREQ;
7575
static uint32_t select_state = SELECT_MEM;
7676
static volatile uint32_t swd_init_debug_flag = 0;
7777

78-
static uint8_t swd_read_core_register(uint32_t n, uint32_t *val);
79-
static uint8_t swd_write_core_register(uint32_t n, uint32_t val);
8078
/* Add static functions */
8179
static uint8_t swd_restart_req(void);
8280
static uint8_t swd_enable_debug(void);
@@ -85,7 +83,7 @@ void swd_set_reset_connect(SWD_CONNECT_TYPE type)
8583
{
8684
}
8785

88-
static void int2array(uint8_t *res, uint32_t data, uint8_t len)
86+
void int2array(uint8_t *res, uint32_t data, uint8_t len)
8987
{
9088
uint8_t i = 0;
9189

@@ -94,7 +92,7 @@ static void int2array(uint8_t *res, uint32_t data, uint8_t len)
9492
}
9593
}
9694

97-
static uint8_t swd_transfer_retry(uint32_t req, uint32_t *data)
95+
uint8_t swd_transfer_retry(uint32_t req, uint32_t *data)
9896
{
9997
uint8_t i, ack;
10098

@@ -380,7 +378,7 @@ static uint8_t swd_write_data(uint32_t address, uint32_t data)
380378
}
381379

382380
// Read 32-bit word from target memory.
383-
static uint8_t swd_read_word(uint32_t addr, uint32_t *val)
381+
uint8_t swd_read_word(uint32_t addr, uint32_t *val)
384382
{
385383
if (!swd_write_ap(AP_CSW, CSW_VALUE | CSW_SIZE32)) {
386384
return 0;
@@ -394,7 +392,7 @@ static uint8_t swd_read_word(uint32_t addr, uint32_t *val)
394392
}
395393

396394
// Write 32-bit word to target memory.
397-
static uint8_t swd_write_word(uint32_t addr, uint32_t val)
395+
uint8_t swd_write_word(uint32_t addr, uint32_t val)
398396
{
399397
if (!swd_write_ap(AP_CSW, CSW_VALUE | CSW_SIZE32)) {
400398
return 0;
@@ -576,7 +574,7 @@ static uint8_t swd_enable_debug(void) {
576574
return 1;
577575
}
578576

579-
static uint8_t swd_read_core_register(uint32_t n, uint32_t *val)
577+
uint8_t swd_read_core_register(uint32_t n, uint32_t *val)
580578
{
581579
if (!swd_write_word(DBGITR, CMD_MCR | (n << 12))) {
582580
return 0;
@@ -589,7 +587,7 @@ static uint8_t swd_read_core_register(uint32_t n, uint32_t *val)
589587
return 1;
590588
}
591589

592-
static uint8_t swd_write_core_register(uint32_t n, uint32_t val)
590+
uint8_t swd_write_core_register(uint32_t n, uint32_t val)
593591
{
594592
if (!swd_write_word(DBGDTRRX, val)){
595593
return 0;

0 commit comments

Comments
 (0)