Skip to content

Commit 6fbcdb5

Browse files
authored
Merge pull request #690 from flit/cleanup/board_and_family
Cleanup target headers
2 parents 6b0a9ea + 7e4cefa commit 6fbcdb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+194
-207
lines changed

source/board/blueninja.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "target_family.h"
2525
#include "target_board.h"
2626

27-
static uint8_t target_set_state_by_board(TARGET_RESET_STATE state)
27+
static uint8_t target_set_state_by_board(target_state_t state)
2828
{
2929

3030
if (RESET_PROGRAM == state) {

source/board/wizwiki_w7500.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "target_board.h"
2525
#include "swd_host.h"
2626

27-
static uint8_t target_set_state_by_board(TARGET_RESET_STATE state)
27+
static uint8_t target_set_state_by_board(target_state_t state)
2828
{
2929
if( state == RESET_PROGRAM )
3030
{

source/board/wizwiki_w7500_eco.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "target_board.h"
2525
#include "swd_host.h"
2626

27-
static uint8_t target_set_state_by_board(TARGET_RESET_STATE state)
27+
static uint8_t target_set_state_by_board(target_state_t state)
2828
{
2929
if( state == RESET_PROGRAM )
3030
{

source/board/wizwiki_w7500p.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "target_board.h"
2525
#include "swd_host.h"
2626

27-
static uint8_t target_set_state_by_board(TARGET_RESET_STATE state)
27+
static uint8_t target_set_state_by_board(target_state_t state)
2828
{
2929
if( state == RESET_PROGRAM )
3030
{

source/daplink/cmsis-dap/DAP_vendor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "main.h"
3333
#include "uart.h"
3434
#include "settings.h"
35-
#include "target_reset.h"
3635
#include "target_family.h"
3736
#include <string.h>
3837

source/daplink/drag-n-drop/vfs_manager.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include "util.h"
3535
#include "version_git.h"
3636
#include "IO_Config.h"
37-
#include "target_reset.h"
3837
#include "file_stream.h"
3938
#include "error.h"
4039

source/daplink/drag-n-drop/vfs_user.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "error.h"
2929
#include "util.h"
3030
#include "settings.h"
31-
#include "target_reset.h"
3231
#include "daplink.h"
3332
#include "version_git.h"
3433
#include "info.h"

source/daplink/interface/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "gpio.h"
3030
#include "uart.h"
3131
#include "tasks.h"
32-
#include "target_reset.h"
3332
#include "swd_host.h"
3433
#include "info.h"
3534
#include "settings.h"

source/daplink/interface/swd_host.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#ifndef TARGET_MCU_CORTEX_A
2323
#include "cmsis_os2.h"
24-
#include "target_reset.h"
2524
#include "target_config.h"
2625
#include "swd_host.h"
2726
#include "debug_cm.h"
@@ -882,7 +881,7 @@ uint8_t swd_init_debug(void)
882881
return 0;
883882
}
884883

885-
uint8_t swd_set_target_state_hw(TARGET_RESET_STATE state)
884+
uint8_t swd_set_target_state_hw(target_state_t state)
886885
{
887886
uint32_t val;
888887
int8_t ap_retries = 2;
@@ -1023,7 +1022,7 @@ uint8_t swd_set_target_state_hw(TARGET_RESET_STATE state)
10231022
return 1;
10241023
}
10251024

1026-
uint8_t swd_set_target_state_sw(TARGET_RESET_STATE state)
1025+
uint8_t swd_set_target_state_sw(target_state_t state)
10271026
{
10281027
uint32_t val;
10291028
int8_t ap_retries = 2;

source/daplink/interface/swd_host.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define SWDHOST_CM_H
2424

2525
#include "flash_blob.h"
26-
#include "target_reset.h"
26+
#include "target_family.h"
2727
#ifdef TARGET_MCU_CORTEX_A
2828
#include "debug_ca.h"
2929
#else
@@ -56,8 +56,8 @@ uint8_t swd_write_memory(uint32_t address, uint8_t *data, uint32_t size);
5656
uint8_t swd_read_core_register(uint32_t n, uint32_t *val);
5757
uint8_t swd_write_core_register(uint32_t n, uint32_t val);
5858
uint8_t swd_flash_syscall_exec(const program_syscall_t *sysCallParam, uint32_t entry, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4);
59-
uint8_t swd_set_target_state_hw(TARGET_RESET_STATE state);
60-
uint8_t swd_set_target_state_sw(TARGET_RESET_STATE state);
59+
uint8_t swd_set_target_state_hw(target_state_t state);
60+
uint8_t swd_set_target_state_sw(target_state_t state);
6161
uint8_t swd_transfer_retry(uint32_t req, uint32_t *data);
6262
void int2array(uint8_t *res, uint32_t data, uint8_t len);
6363
void swd_set_reset_connect(SWD_CONNECT_TYPE type);

0 commit comments

Comments
 (0)