]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Output/pjrcUSB/arm/usb_serial.h
Major USB update, fixes most (if not all) known issues
[kiibohd-controller.git] / Output / pjrcUSB / arm / usb_serial.h
index 09980d33c2912d3028e9a89baa88052035451936..9d223dace4c105994a7b57b86737e212fb6f895a 100644 (file)
@@ -1,7 +1,7 @@
 /* Teensyduino Core Library
  * http://www.pjrc.com/teensy/
  * Copyright (c) 2013 PJRC.COM, LLC.
- * Modifications by Jacob Alexander (2013-2015)
+ * Modifications by Jacob Alexander (2013-2016)
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
 
 
 
+// ----- Structs -----
+
+// See: Universal Serial Bus Class Definitions for Communication Devices 1.11 Table 50
+// dwDTERate   - Baud Rate : 4 bytes
+// bCharFormat - Stop Bits : 1 byte
+//   0: 1   stop bit
+//   1: 1.5 stop bits
+//   2: 2   stop bits
+// bParityType - Parity    : 1 byte
+//   0: None
+//   1: Odd
+//   2: Even
+//   3: Mark
+//   4: Space
+// bDataBits   - Data Bits : 1 byte
+//  (5,6,7,8 or 16)
+//
+// Struct is 7 bytes wide
+typedef struct USBCDCLineCoding {
+       uint32_t dwDTERate;   // Baud Rate
+       uint8_t  bCharFormat; // Stop Bits
+       uint8_t  bParityType; // Parity
+       uint8_t  bDataBits;   // Data Bits
+} USBCDCLineCoding;
+
+
+
 // ----- Variables -----
 
-extern volatile uint8_t usb_cdc_line_coding[7];
+extern volatile USBCDCLineCoding usb_cdc_line_coding;
 
 extern volatile uint8_t usb_cdc_line_rtsdtr;
 extern volatile uint8_t usb_cdc_transmit_flush_timer;