changeset 225:b4e7a712cc15

Cleanup - Changing main device type to HID (0x03)
author Jacob Alexander <haata@kiibohd.com>
date Tue, 23 Sep 2014 11:42:40 -0700
parents 138e5ca7f8e4
children 718e74285b36
files Output/pjrcUSB/avr/usb_keyboard_serial.c Output/pjrcUSB/avr/usb_keyboard_serial.h
diffstat 2 files changed, 20 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/Output/pjrcUSB/avr/usb_keyboard_serial.c	Sun Sep 21 16:29:53 2014 -0700
+++ b/Output/pjrcUSB/avr/usb_keyboard_serial.c	Tue Sep 23 11:42:40 2014 -0700
@@ -171,7 +171,7 @@
 // ----- USB Virtual Serial Port (CDC) Functions -----
 
 // get the next character, or -1 if nothing received
-int16_t usb_serial_getchar(void)
+int16_t usb_serial_getchar()
 {
 	uint8_t c, intr_state;
 
@@ -205,7 +205,7 @@
 }
 
 // number of bytes available in the receive buffer
-uint8_t usb_serial_available(void)
+uint8_t usb_serial_available()
 {
 	uint8_t n=0, i, intr_state;
 
@@ -224,7 +224,7 @@
 }
 
 // discard any buffered input
-void usb_serial_flush_input(void)
+void usb_serial_flush_input()
 {
 	uint8_t intr_state;
 
@@ -480,24 +480,24 @@
 // at full USB speed), but they are set by the host so we can
 // set them properly if we're converting the USB to a real serial
 // communication
-uint32_t usb_serial_get_baud(void)
+uint32_t usb_serial_get_baud()
 {
 	uint32_t *baud = (uint32_t*)cdc_line_coding;
 	return *baud;
 }
-uint8_t usb_serial_get_stopbits(void)
+uint8_t usb_serial_get_stopbits()
 {
 	return cdc_line_coding[4];
 }
-uint8_t usb_serial_get_paritytype(void)
+uint8_t usb_serial_get_paritytype()
 {
 	return cdc_line_coding[5];
 }
-uint8_t usb_serial_get_numbits(void)
+uint8_t usb_serial_get_numbits()
 {
 	return cdc_line_coding[6];
 }
-uint8_t usb_serial_get_control(void)
+uint8_t usb_serial_get_control()
 {
 	return cdc_line_rtsdtr;
 }
@@ -587,7 +587,7 @@
 
 
 // WDT Setup for software reset the chip
-void wdt_init(void)
+void wdt_init()
 {
 	MCUSR = 0;
 	wdt_disable();
@@ -595,7 +595,7 @@
 
 
 // initialize USB
-void usb_init(void)
+void usb_init()
 {
 	HW_CONFIG();
 	USB_FREEZE();				// enable USB
@@ -674,19 +674,19 @@
 
 
 // Misc functions to wait for ready and send/receive packets
-static inline void usb_wait_in_ready(void)
+static inline void usb_wait_in_ready()
 {
 	while (!(UEINTX & (1<<TXINI))) ;
 }
-static inline void usb_send_in(void)
+static inline void usb_send_in()
 {
 	UEINTX = ~(1<<TXINI);
 }
-static inline void usb_wait_receive_out(void)
+static inline void usb_wait_receive_out()
 {
 	while (!(UEINTX & (1<<RXOUTI))) ;
 }
-static inline void usb_ack_out(void)
+static inline void usb_ack_out()
 {
 	UEINTX = ~(1<<RXOUTI);
 }
@@ -697,7 +697,7 @@
 // other endpoints are manipulated by the user-callable
 // functions, and the start-of-frame interrupt.
 //
-ISR(USB_COM_vect)
+ISR( USB_COM_vect )
 {
         uint8_t intbits;
 	const uint8_t *list;
--- a/Output/pjrcUSB/avr/usb_keyboard_serial.h	Sun Sep 21 16:29:53 2014 -0700
+++ b/Output/pjrcUSB/avr/usb_keyboard_serial.h	Tue Sep 23 11:42:40 2014 -0700
@@ -24,6 +24,8 @@
 #ifndef usb_keyboard_serial_h__
 #define usb_keyboard_serial_h__
 
+// ----- Includes -----
+
 // Compiler Includes
 #include <stdint.h>
 
@@ -40,6 +42,7 @@
 #include "output_com.h"
 
 
+
 // ----- Function Declarations -----
 
 // Basic USB Configuration
@@ -257,7 +260,7 @@
 	18,					// bLength
 	1,					// bDescriptorType
 	0x00, 0x02,				// bcdUSB
-	0,					// bDeviceClass
+	0x03,					// bDeviceClass - 0x03 = HID Class
 	0,					// bDeviceSubClass
 	0,					// bDeviceProtocol
 	ENDPOINT0_SIZE,				// bMaxPacketSize0
@@ -647,5 +650,6 @@
 #define NUM_DESC_LIST (sizeof(descriptor_list)/sizeof(struct descriptor_list_struct))
 
 
+
 #endif // usb_keyboard_serial_h__