aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/stm32/gdb_if.c
diff options
context:
space:
mode:
authorGareth McMullin2014-10-16 13:19:34 -0700
committerGareth McMullin2014-10-16 13:50:56 -0700
commita5549d630c3c261e7d52cb245d945e54f011a3e7 (patch)
tree3dafd4329c35dc8420e90b1a0c890f94660ee7e1 /src/platforms/stm32/gdb_if.c
parent60626e5bbe8761544cb195ceb3ec7c85ff1e246e (diff)
Whitespace cleanup.
Diffstat (limited to 'src/platforms/stm32/gdb_if.c')
-rw-r--r--src/platforms/stm32/gdb_if.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/platforms/stm32/gdb_if.c b/src/platforms/stm32/gdb_if.c
index 28bc4c8..482effe 100644
--- a/src/platforms/stm32/gdb_if.c
+++ b/src/platforms/stm32/gdb_if.c
@@ -67,8 +67,8 @@ void gdb_usb_out_cb(usbd_device *dev, uint8_t ep)
{
(void)ep;
usbd_ep_nak_set(dev, CDCACM_GDB_ENDPOINT, 1);
- count_new = usbd_ep_read_packet(dev, CDCACM_GDB_ENDPOINT,
- double_buffer_out, CDCACM_PACKET_SIZE);
+ count_new = usbd_ep_read_packet(dev, CDCACM_GDB_ENDPOINT,
+ double_buffer_out, CDCACM_PACKET_SIZE);
if(!count_new) {
usbd_ep_nak_set(dev, CDCACM_GDB_ENDPOINT, 0);
}
@@ -77,19 +77,19 @@ void gdb_usb_out_cb(usbd_device *dev, uint8_t ep)
unsigned char gdb_if_getchar(void)
{
- while(!(out_ptr < count_out)) {
+ while (!(out_ptr < count_out)) {
/* Detach if port closed */
- if(!cdcacm_get_dtr())
+ if (!cdcacm_get_dtr())
return 0x04;
- while(cdcacm_get_config() != 1);
- if (count_new) {
- memcpy(buffer_out, double_buffer_out,count_new);
- count_out = count_new;
- count_new = 0;
- out_ptr = 0;
- usbd_ep_nak_set(usbdev, CDCACM_GDB_ENDPOINT, 0);
- }
+ while (cdcacm_get_config() != 1);
+ if (count_new) {
+ memcpy(buffer_out, double_buffer_out,count_new);
+ count_out = count_new;
+ count_new = 0;
+ out_ptr = 0;
+ usbd_ep_nak_set(usbdev, CDCACM_GDB_ENDPOINT, 0);
+ }
}
return buffer_out[out_ptr++];
@@ -99,19 +99,19 @@ unsigned char gdb_if_getchar_to(int timeout)
{
timeout_counter = timeout/100;
- if(!(out_ptr < count_out)) do {
+ if (!(out_ptr < count_out)) do {
/* Detach if port closed */
- if(!cdcacm_get_dtr())
+ if (!cdcacm_get_dtr())
return 0x04;
- while(cdcacm_get_config() != 1);
- if (count_new) {
- memcpy(buffer_out, double_buffer_out,count_new);
- count_out = count_new;
- count_new = 0;
- out_ptr = 0;
- usbd_ep_nak_set(usbdev, CDCACM_GDB_ENDPOINT, 0);
- }
+ while (cdcacm_get_config() != 1);
+ if (count_new) {
+ memcpy(buffer_out, double_buffer_out,count_new);
+ count_out = count_new;
+ count_new = 0;
+ out_ptr = 0;
+ usbd_ep_nak_set(usbdev, CDCACM_GDB_ENDPOINT, 0);
+ }
} while(timeout_counter && !(out_ptr < count_out));
if(out_ptr < count_out)