From 8a918076632571bfdad866ccbc4068c4115b6db7 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 11 Apr 2020 15:51:25 +0200 Subject: Add local changes --- bluefnorf/main.c | 19 ++----------------- bluefnorf/usb.c | 15 ++++----------- 2 files changed, 6 insertions(+), 28 deletions(-) (limited to 'bluefnorf') diff --git a/bluefnorf/main.c b/bluefnorf/main.c index 540b41b..4c18306 100644 --- a/bluefnorf/main.c +++ b/bluefnorf/main.c @@ -15,26 +15,11 @@ #include "usb.h" -int main(void) -{ - int i = 0; - // const char* line; - - // Clock Setup +int main(void) { rcc_clock_setup_in_hse_8mhz_out_72mhz(); - - // Initialize USB usb_serial_init(); - while (1) { - /* - if( i % 100000 == 0 ) { - // Read ADC - printf("Fnord 42 :: %d %d\r\n", _adc_samples[0], _adc_samples[1]); - } - */ - - i++; + while (42) { } } diff --git a/bluefnorf/usb.c b/bluefnorf/usb.c index 00f363d..688fc89 100644 --- a/bluefnorf/usb.c +++ b/bluefnorf/usb.c @@ -63,8 +63,8 @@ static const struct usb_endpoint_descriptor comm_endp[] = {{ .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = 0x83, .bmAttributes = USB_ENDPOINT_ATTR_INTERRUPT, - .wMaxPacketSize = 16, - .bInterval = 255, + .wMaxPacketSize = 64, + .bInterval = 1, }}; static const struct usb_endpoint_descriptor data_endp[] = {{ @@ -74,13 +74,6 @@ static const struct usb_endpoint_descriptor data_endp[] = {{ .bmAttributes = USB_ENDPOINT_ATTR_BULK, .wMaxPacketSize = 64, .bInterval = 1, -}, { - .bLength = USB_DT_ENDPOINT_SIZE, - .bDescriptorType = USB_DT_ENDPOINT, - .bEndpointAddress = 0x82, - .bmAttributes = USB_ENDPOINT_ATTR_BULK, - .wMaxPacketSize = 64, - .bInterval = 1, }}; static const struct usb_interface_descriptor comm_iface[] = {{ @@ -105,7 +98,7 @@ static const struct usb_interface_descriptor data_iface[] = {{ .bDescriptorType = USB_DT_INTERFACE, .bInterfaceNumber = 1, .bAlternateSetting = 0, - .bNumEndpoints = 2, + .bNumEndpoints = 1, .bInterfaceClass = USB_CLASS_DATA, .bInterfaceSubClass = 0, .bInterfaceProtocol = 0, @@ -139,7 +132,7 @@ static const struct usb_config_descriptor config = { static const char *usb_strings[] = { "Chaos Computer Club Berlin e.V.", "bluefnorf", - "bf1", + "bf2", }; -- cgit