diff options
author | jaseg <git@jaseg.net> | 2020-04-11 15:51:25 +0200 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2020-04-11 15:51:25 +0200 |
commit | 8a918076632571bfdad866ccbc4068c4115b6db7 (patch) | |
tree | 189fcf9fa5c0d481ca9441044f23b9db31f6cacf /bluefnorf | |
parent | d07138f86f342e77c96d567c3120c1abc8afc017 (diff) | |
download | olsndot-master.tar.gz olsndot-master.tar.bz2 olsndot-master.zip |
Diffstat (limited to 'bluefnorf')
-rw-r--r-- | bluefnorf/main.c | 19 | ||||
-rw-r--r-- | bluefnorf/usb.c | 15 |
2 files changed, 6 insertions, 28 deletions
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", }; |