aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/stm32
diff options
context:
space:
mode:
authorGareth McMullin2013-01-10 22:01:21 -0800
committerGareth McMullin2013-01-10 22:01:21 -0800
commitad9c76e97f1e20d3a564d296d156e67a80fbd6dc (patch)
tree87c6bab3259b2266a21691b9761ac891cdfbff15 /src/platforms/stm32
parenta84052915fa067e19de556e5cf2837ee0bbf8a53 (diff)
Update to current libopencm3 usb api.
Diffstat (limited to 'src/platforms/stm32')
-rw-r--r--src/platforms/stm32/gdb_if.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/platforms/stm32/gdb_if.c b/src/platforms/stm32/gdb_if.c
index 30ad247..0e702a2 100644
--- a/src/platforms/stm32/gdb_if.c
+++ b/src/platforms/stm32/gdb_if.c
@@ -43,7 +43,8 @@ void gdb_if_putchar(unsigned char c, int flush)
count_in = 0;
return;
}
- while(usbd_ep_write_packet(CDCACM_GDB_ENDPOINT, buffer_in, count_in) <= 0);
+ while(usbd_ep_write_packet(usbdev, CDCACM_GDB_ENDPOINT,
+ buffer_in, count_in) <= 0);
count_in = 0;
}
}
@@ -56,8 +57,8 @@ unsigned char gdb_if_getchar(void)
return 0x04;
while(cdcacm_get_config() != 1);
- count_out = usbd_ep_read_packet(CDCACM_GDB_ENDPOINT, buffer_out,
- CDCACM_PACKET_SIZE);
+ count_out = usbd_ep_read_packet(usbdev, CDCACM_GDB_ENDPOINT,
+ buffer_out, CDCACM_PACKET_SIZE);
out_ptr = 0;
}
@@ -73,12 +74,12 @@ unsigned char gdb_if_getchar_to(int timeout)
if(!cdcacm_get_dtr())
return 0x04;
- count_out = usbd_ep_read_packet(CDCACM_GDB_ENDPOINT, buffer_out,
- CDCACM_PACKET_SIZE);
+ count_out = usbd_ep_read_packet(usbdev, CDCACM_GDB_ENDPOINT,
+ buffer_out, CDCACM_PACKET_SIZE);
out_ptr = 0;
} while(timeout_counter && !(out_ptr < count_out));
- if(out_ptr < count_out)
+ if(out_ptr < count_out)
return gdb_if_getchar();
return -1;