hal_diag_write_char_serial('O');
csum += 'O';
for (i = 0; i < pos; i++) {
- char ch = line[i];
- char h = hex[(ch>>4)&0xF];
- char l = hex[ch&0xF];
- hal_diag_write_char_serial(h);
- hal_diag_write_char_serial(l);
- csum += h;
- csum += l;
+ char ch = line[i];
+ char h = hex[(ch >> 4) & 0xF];
+ char l = hex[ch & 0xF];
+ hal_diag_write_char_serial(h);
+ hal_diag_write_char_serial(l);
+ csum += h;
+ csum += l;
}
hal_diag_write_char_serial('#');
- hal_diag_write_char_serial(hex[(csum>>4)&0xF]);
- hal_diag_write_char_serial(hex[csum&0xF]);
+ hal_diag_write_char_serial(hex[(csum >> 4) & 0xF]);
+ hal_diag_write_char_serial(hex[csum & 0xF]);
// Wait for the ACK character '+' from GDB here and handle
// receiving a ^C instead. This is the reason for this clause
if (!hal_diag_read_serial(&c1))
continue; // No response - try sending packet again
- if ( c1 == '+' )
+ if (c1 == '+')
break; // a good acknowledge
#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
cyg_drv_interrupt_acknowledge(CYG_DEV_SERIAL_INT);
- if ( c1 == 3 ) {
- // Ctrl-C: breakpoint.
- cyg_hal_gdb_interrupt (__builtin_return_address(0));
- break;
+ if (c1 == 3) {
+ // Ctrl-C: breakpoint.
+ cyg_hal_gdb_interrupt (__builtin_return_address(0));
+ break;
}
#endif
// otherwise, loop round again