Skip to content

Commit 9eac702

Browse files
authored
Merge pull request #680 from flit/bugfix/stm32f103_warnings
Fix numerous little issues
2 parents b2288df + 19a5f33 commit 9eac702

Some content is hidden

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

55 files changed

+2657
-6214
lines changed

source/board/mkit_dk_dongle_nrf5x.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* See the License for the specific language governing permissions and
1919
* limitations under the License.
2020
*/
21-
21+
2222
#include "sam3u2c.h"
2323
#include "DAP_config.h"
2424
#include "target_config.h"
@@ -37,6 +37,7 @@ const char *board_id_nrf52840_dk = "1102";
3737
extern target_cfg_t target_device_nrf52;
3838
extern target_cfg_t target_device_nrf52840;
3939
static uint8_t device_type;
40+
4041
static void set_target_device(uint32_t device)
4142
{
4243
device_type = device;
@@ -52,27 +53,27 @@ static void set_target_device(uint32_t device)
5253
}
5354

5455

55-
static void prerun_board_config(void)
56+
static void nrf_prerun_board_config(void)
5657
{
5758
// Work around for setting the correct board id based on GPIOs
5859
uint8_t bit1;
5960
uint8_t bit2;
6061
uint8_t bit3;
61-
62+
6263
PIOB->PIO_PER = (1 << 1); // Enable PIO pin PB1
6364
PIOB->PIO_PER = (1 << 2); // Enable PIO pin PB2
6465
PIOB->PIO_PER = (1 << 3); // Enable PIO pin PB3
6566
PIOB->PIO_ODR = (1 << 1); // Disabe output
6667
PIOB->PIO_ODR = (1 << 2); // Disabe output
6768
PIOB->PIO_ODR = (1 << 3); // Disabe output
68-
PIOB->PIO_PUER = (1 << 1); // Enable pull-up
69+
PIOB->PIO_PUER = (1 << 1); // Enable pull-up
6970
PIOB->PIO_PUER = (1 << 2); // Enable pull-up
7071
PIOB->PIO_PUER = (1 << 3); // Enable pull-up
71-
72+
7273
bit1 = (PIOB->PIO_PDSR >> 1) & 1; // Read PB1
7374
bit2 = (PIOB->PIO_PDSR >> 2) & 1; // Read PB2
7475
bit3 = (PIOB->PIO_PDSR >> 3) & 1; // Read PB3
75-
76+
7677
/* pins translate to board-ids as follow
7778
*
7879
* PB3|PB2|PB1|BOARD ID| BOARD
@@ -87,7 +88,7 @@ static void prerun_board_config(void)
8788
* 1 | 1 | 0 | undefined
8889
*/
8990

90-
91+
9192
if (bit3) {
9293
set_target_device(0);
9394
target_device.rt_family_id = kNordic_Nrf51_FamilyID;
@@ -115,13 +116,13 @@ static void prerun_board_config(void)
115116
target_device.rt_board_id = board_id_nrf52840_dk; // 1102
116117
}
117118
}
118-
119-
PIOB->PIO_PUDR = (1 << 1); // Disable pull-up
119+
120+
PIOB->PIO_PUDR = (1 << 1); // Disable pull-up
120121
PIOB->PIO_PUDR = (1 << 2); // Disable pull-up
121122
PIOB->PIO_PUDR = (1 << 3); // Disable pull-up
122123
}
123124

124-
static void swd_set_target_reset(uint8_t asserted){
125+
static void nrf_swd_set_target_reset(uint8_t asserted){
125126
if (asserted && device_type == 0) {
126127
PIOA->PIO_OER = PIN_SWDIO;
127128
PIOA->PIO_OER = PIN_SWCLK;
@@ -133,7 +134,7 @@ static void swd_set_target_reset(uint8_t asserted){
133134
const board_info_t g_board_info = {
134135
.infoVersion = 0x0,
135136
.flags = kEnablePageErase,
136-
.prerun_board_config = prerun_board_config,
137-
.swd_set_target_reset = swd_set_target_reset,
137+
.prerun_board_config = nrf_prerun_board_config,
138+
.swd_set_target_reset = nrf_swd_set_target_reset,
138139
.target_cfg = &target_device,
139140
};

source/board/ublox_evk_nina_b1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "target_board.h"
2424
#include "target_family.h"
2525

26-
static void swd_set_target_reset(uint8_t asserted){
26+
static void nina_swd_set_target_reset(uint8_t asserted){
2727
if(!asserted) {
2828
PIOA->PIO_MDER = PIN_SWDIO | PIN_SWCLK | PIN_nRESET;
2929
}
@@ -33,6 +33,6 @@ const board_info_t g_board_info = {
3333
.infoVersion = 0x0,
3434
.board_id = "1237",
3535
.family_id = kNordic_Nrf52_FamilyID,
36-
.swd_set_target_reset = swd_set_target_reset,
36+
.swd_set_target_reset = nina_swd_set_target_reset,
3737
.target_cfg = &target_device,
3838
};

source/board/unsupported/app_config_id_5020.c

Lines changed: 0 additions & 38 deletions
This file was deleted.

source/board/unsupported/app_config_id_5500.c

Lines changed: 0 additions & 40 deletions
This file was deleted.

source/board/vbluno51.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "target_board.h"
2424
#include "target_family.h"
2525

26-
static void prerun_board_config()
26+
static void vbluno_prerun_board_config()
2727
{
2828
uart_enable_flow_control(false);
2929
}
@@ -33,6 +33,6 @@ const board_info_t g_board_info = {
3333
.board_id = "C006",
3434
.family_id = kNordic_Nrf51_FamilyID,
3535
.daplink_target_url = "https://os.mbed.com/platforms/VBLUNO51/",
36-
.prerun_board_config = prerun_board_config,
36+
.prerun_board_config = vbluno_prerun_board_config,
3737
.target_cfg = &target_device,
3838
};

source/board/wizwiki_w7500.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "cmsis_os2.h"
2323
#include "target_family.h"
2424
#include "target_board.h"
25+
#include "swd_host.h"
2526

2627
static uint8_t target_set_state_by_board(TARGET_RESET_STATE state)
2728
{

source/board/wizwiki_w7500_eco.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "cmsis_os2.h"
2323
#include "target_family.h"
2424
#include "target_board.h"
25+
#include "swd_host.h"
2526

2627
static uint8_t target_set_state_by_board(TARGET_RESET_STATE state)
2728
{

source/board/wizwiki_w7500p.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "cmsis_os2.h"
2323
#include "target_family.h"
2424
#include "target_board.h"
25+
#include "swd_host.h"
2526

2627
static uint8_t target_set_state_by_board(TARGET_RESET_STATE state)
2728
{

source/daplink/info.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "main.h"
2424
#include "info.h"
2525
#include "target_config.h"
26-
#include "board.h"
2726
#include "read_uid.h"
2827
#include "util.h"
2928
#include "crc.h"

source/daplink/interface/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "cmsis_os2.h"
2727
#include "rl_usb.h"
2828
#include "main.h"
29-
#include "board.h"
3029
#include "gpio.h"
3130
#include "uart.h"
3231
#include "tasks.h"

0 commit comments

Comments
 (0)