Skip to content

Commit e1ad357

Browse files
committed
Trailing whitespace cleanup.
1 parent dcb764c commit e1ad357

File tree

30 files changed

+82
-82
lines changed

30 files changed

+82
-82
lines changed

source/daplink/circ_buf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ uint8_t circ_buf_pop(circ_buf_t *circ_buf)
7373
}
7474

7575
cortex_int_restore(state);
76-
76+
7777
return data;
7878
}
7979

@@ -93,7 +93,7 @@ uint32_t circ_buf_count_used(circ_buf_t *circ_buf)
9393
cortex_int_restore(state);
9494
return cnt;
9595
}
96-
96+
9797
uint32_t circ_buf_count_free(circ_buf_t *circ_buf)
9898
{
9999
uint32_t cnt;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static bool flash_decoder_is_at_end(uint32_t addr, const uint8_t *data, uint32_t
352352
case FLASH_DECODER_TYPE_INTERFACE:
353353
end_addr = DAPLINK_ROM_IF_START + DAPLINK_ROM_IF_SIZE;
354354
break;
355-
355+
356356
case FLASH_DECODER_TYPE_TARGET:
357357
//only if we are sure it is a bin for the target; without check unordered hex files will cause to terminate flashing
358358
if (flash_type_target_bin && g_board_info.target_cfg) {
@@ -366,7 +366,7 @@ static bool flash_decoder_is_at_end(uint32_t addr, const uint8_t *data, uint32_t
366366
if(end_addr == 0){ //invalid end_addr
367367
return false;
368368
}
369-
369+
370370
}
371371
else {
372372
return false;

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ error_t flash_manager_init(const flash_intf_t *flash_intf)
9393
return status;
9494
}
9595

96-
if (!page_erase_enabled) {
96+
if (!page_erase_enabled) {
9797
// Erase flash and unint if there are errors
9898
status = intf->erase_chip();
9999
flash_manager_printf(" intf->erase_chip ret=%i\r\n", status);
@@ -132,16 +132,16 @@ error_t flash_manager_data(uint32_t addr, const uint8_t *data, uint32_t size)
132132
current_sector_valid = true;
133133
last_addr = addr;
134134
}
135-
135+
136136
//non-increasing address support
137-
if (ROUND_DOWN(addr, current_write_block_size) != ROUND_DOWN(last_addr, current_write_block_size)) {
137+
if (ROUND_DOWN(addr, current_write_block_size) != ROUND_DOWN(last_addr, current_write_block_size)) {
138138
status = flush_current_block(addr);
139139
if (ERROR_SUCCESS != status) {
140140
state = STATE_ERROR;
141141
return status;
142142
}
143143
}
144-
144+
145145
if (ROUND_DOWN(addr, current_sector_size) != ROUND_DOWN(last_addr, current_sector_size)) {
146146
status = setup_next_sector(addr);
147147
if (ERROR_SUCCESS != status) {
@@ -269,7 +269,7 @@ static bool flash_intf_valid(const flash_intf_t *flash_intf)
269269
if (0 == flash_intf->erase_sector_size) {
270270
return false;
271271
}
272-
272+
273273
if (0 == flash_intf->flash_busy) {
274274
return false;
275275
}
@@ -325,15 +325,15 @@ static error_t setup_next_sector(uint32_t addr)
325325
return status;
326326
}
327327
}
328-
328+
329329
if (page_erase_enabled) {
330330
// Erase the current sector
331331
status = intf->erase_sector(current_sector_addr);
332332
flash_manager_printf(" intf->erase_sector(addr=0x%x) ret=%i\r\n", current_sector_addr);
333333
if (ERROR_SUCCESS != status) {
334334
intf->uninit();
335335
return status;
336-
}
336+
}
337337
}
338338

339339
// Clear out buffer in case block size changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ hexfile_parse_status_t parse_hex_blob(const uint8_t *hex_blob, const uint32_t he
136136
default:
137137
if (low_nibble) {
138138
line.buf[idx] |= ctoh((uint8_t)(*hex_blob)) & 0xf;
139-
if (++idx >= (line.byte_count + 5)) { //all data in
139+
if (++idx >= (line.byte_count + 5)) { //all data in
140140
if (0 == validate_checksum(&line)) {
141141
status = HEX_PARSE_CKSUM_FAIL;
142142
goto hex_parser_exit;
@@ -201,7 +201,7 @@ hexfile_parse_status_t parse_hex_blob(const uint8_t *hex_blob, const uint32_t he
201201
break;
202202
}
203203
}
204-
}
204+
}
205205
}
206206
} else {
207207
if (idx < sizeof(hex_line_t)) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ static void transfer_reset_file_info()
634634
file_transfer_state = default_transfer_state;
635635
abort_remount();
636636
}
637-
637+
638638
}
639639

640640
// Update the tranfer state with new information

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@ void vfs_init(const vfs_filename_t drive_name, uint32_t disk_size)
348348
}
349349
if (total_sectors >= 0x10000) {
350350
mbr.total_logical_sectors = 0;
351-
mbr.big_sectors_on_drive = total_sectors;
351+
mbr.big_sectors_on_drive = total_sectors;
352352
} else {
353353
mbr.total_logical_sectors = total_sectors;
354-
mbr.big_sectors_on_drive = 0;
354+
mbr.big_sectors_on_drive = 0;
355355
}
356356
// FAT table will likely be larger than needed, but this is allowed by the
357357
// fat specification
@@ -612,7 +612,7 @@ static uint32_t read_dir(uint32_t sector_offset, uint8_t *data, uint32_t num_sec
612612
util_assert(0);
613613
return 0;
614614
}
615-
615+
616616
// Zero buffer data is VFS_SECTOR_SIZE max
617617
memset(data, 0, VFS_SECTOR_SIZE);
618618

source/daplink/interface/target_flash.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static program_target_t * get_flash_algo(uint32_t addr)
8989
}
9090
}
9191
}
92-
92+
9393
//could not find a flash algo for the region; use default
9494
if (default_region) {
9595
flash_start = default_region->start;
@@ -139,9 +139,9 @@ static error_t target_flash_set(uint32_t addr)
139139
if (0 == swd_write_memory(new_flash_algo->algo_start, (uint8_t *)new_flash_algo->algo_blob, new_flash_algo->algo_size)) {
140140
return ERROR_ALGO_DL;
141141
}
142-
142+
143143
current_flash_algo = new_flash_algo;
144-
144+
145145
}
146146
return ERROR_SUCCESS;
147147
}
@@ -150,13 +150,13 @@ static error_t target_flash_init()
150150
{
151151
if (g_board_info.target_cfg) {
152152
last_flash_func = FLASH_FUNC_NOP;
153-
153+
154154
current_flash_algo = NULL;
155-
155+
156156
if (0 == target_set_state(RESET_PROGRAM)) {
157157
return ERROR_RESET;
158158
}
159-
159+
160160
//get default region
161161
region_info_t * flash_region = g_board_info.target_cfg->flash_regions;
162162
for (; flash_region->start != 0 || flash_region->end != 0; ++flash_region) {
@@ -171,7 +171,7 @@ static error_t target_flash_init()
171171
} else {
172172
return ERROR_FAILURE;
173173
}
174-
174+
175175
}
176176

177177
static error_t target_flash_uninit(void)
@@ -191,7 +191,7 @@ static error_t target_flash_uninit(void)
191191
// Check to see if anything needs to be done after programming.
192192
// This is usually a no-op for most targets.
193193
target_set_state(POST_FLASH_RESET);
194-
194+
195195
state = STATE_CLOSED;
196196
swd_off();
197197
return ERROR_SUCCESS;
@@ -205,11 +205,11 @@ static error_t target_flash_program_page(uint32_t addr, const uint8_t *buf, uint
205205
if (g_board_info.target_cfg) {
206206
error_t status = ERROR_SUCCESS;
207207
program_target_t * flash = current_flash_algo;
208-
208+
209209
if (!flash) {
210210
return ERROR_INTERNAL;
211211
}
212-
212+
213213
// check if security bits were set
214214
if (g_target_family && g_target_family->security_bits_set){
215215
if (1 == g_target_family->security_bits_set(addr, (uint8_t *)buf, size)) {
@@ -222,7 +222,7 @@ static error_t target_flash_program_page(uint32_t addr, const uint8_t *buf, uint
222222
if (status != ERROR_SUCCESS) {
223223
return status;
224224
}
225-
225+
226226
while (size > 0) {
227227
uint32_t write_size = MIN(size, flash->program_buffer_size);
228228

@@ -277,11 +277,11 @@ static error_t target_flash_program_page(uint32_t addr, const uint8_t *buf, uint
277277
addr += write_size;
278278
buf += write_size;
279279
size -= write_size;
280-
280+
281281
}
282282

283283
return ERROR_SUCCESS;
284-
284+
285285
} else {
286286
return ERROR_FAILURE;
287287
}
@@ -296,7 +296,7 @@ static error_t target_flash_erase_sector(uint32_t addr)
296296
if (!flash) {
297297
return ERROR_INTERNAL;
298298
}
299-
299+
300300
// Check to make sure the address is on a sector boundary
301301
if ((addr % target_flash_erase_sector_size(addr)) != 0) {
302302
return ERROR_ERASE_SECTOR;
@@ -307,7 +307,7 @@ static error_t target_flash_erase_sector(uint32_t addr)
307307
if (status != ERROR_SUCCESS) {
308308
return status;
309309
}
310-
310+
311311
if (0 == swd_flash_syscall_exec(&flash->sys_call_s, flash->erase_sector, addr, 0, 0, 0)) {
312312
return ERROR_ERASE_SECTOR;
313313
}
@@ -325,7 +325,7 @@ static error_t target_flash_erase_chip(void)
325325
region_info_t * flash_region = g_board_info.target_cfg->flash_regions;
326326

327327
for (; flash_region->start != 0 || flash_region->end != 0; ++flash_region) {
328-
status = target_flash_set(flash_region->start);
328+
status = target_flash_set(flash_region->start);
329329
if (status != ERROR_SUCCESS) {
330330
return status;
331331
}
@@ -365,7 +365,7 @@ static uint32_t target_flash_program_page_min_size(uint32_t addr)
365365
static uint32_t target_flash_erase_sector_size(uint32_t addr)
366366
{
367367
if (g_board_info.target_cfg){
368-
if(g_board_info.target_cfg->sector_info_length > 0) {
368+
if(g_board_info.target_cfg->sector_info_length > 0) {
369369
int sector_index = g_board_info.target_cfg->sector_info_length - 1;
370370
for (; sector_index >= 0; sector_index--) {
371371
if (addr >= g_board_info.target_cfg->sectors_info[sector_index].start) {

source/daplink/settings/settings.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ typedef struct __attribute__((__packed__)) cfg_ram {
4848
char assert_file_name[64 + 1];
4949
uint16_t assert_line;
5050
uint8_t assert_source;
51-
51+
5252
// Additional debug information on faults
5353
uint8_t valid_dumps;
5454
uint32_t hexdump[ALLOWED_HEXDUMP]; //Alignments checked
55-
55+
5656
// Disable msd support
5757
uint8_t disable_msd;
58-
58+
5959
//Add new entries from here
6060

6161
} cfg_ram_t;
@@ -214,7 +214,7 @@ uint8_t config_ram_get_hexdumps(uint32_t **hexdumps)
214214
if (config_ram.valid_dumps == 0) {
215215
return 0;
216216
}
217-
217+
218218
//prevent memcopy check alignment
219219
*hexdumps = config_ram.hexdump;
220220
return config_ram.valid_dumps;

source/daplink/usb2uart/usbd_user_cdc_acm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ static U32 start_break_time = 0;
114114
int32_t USBD_CDC_ACM_SendBreak(uint16_t dur)
115115
{
116116
uint32_t end_break_time;
117-
#ifdef DRAG_N_DROP_SUPPORT
118-
if (!flash_intf_target->flash_busy())
119-
#endif
117+
#ifdef DRAG_N_DROP_SUPPORT
118+
if (!flash_intf_target->flash_busy())
119+
#endif
120120
{ //added checking if flashing on target is in progress
121121
// reset and send the unique id over CDC
122122
if (dur != 0) {
@@ -187,7 +187,7 @@ void cdc_process_event()
187187
main_blink_cdc_led(MAIN_LED_FLASH);
188188
}
189189
}
190-
190+
191191
// Always process events
192192
main_cdc_send_event();
193193
}

source/daplink/validation.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ uint8_t validate_bin_nvic(const uint8_t *buf)
3434
{
3535
if (g_target_family && g_target_family->validate_bin_nvic) {
3636
return g_target_family && g_target_family->validate_bin_nvic(buf);
37-
} else if (g_board_info.target_cfg) {
37+
} else if (g_board_info.target_cfg) {
3838
uint32_t i = 4, nvic_val = 0;
3939
uint8_t in_range = 0;
4040
// test the initial SP value
@@ -47,7 +47,7 @@ uint8_t validate_bin_nvic(const uint8_t *buf)
4747
break;
4848
}
4949
}
50-
50+
5151
if (in_range == 0) {
5252
return 0;
5353
}

0 commit comments

Comments
 (0)