mirror of
https://github.com/dougg3/mac-rom-simm-programmer.git
synced 2024-12-27 22:32:35 +00:00
Did some more splitting of responsibilities in the code
This commit is contained in:
parent
e8999cfc54
commit
147c2bfda3
29
cdc_device_definition.c
Normal file
29
cdc_device_definition.c
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* cdc_device_definition.c
|
||||
*
|
||||
* Created on: Dec 26, 2011
|
||||
* Author: Doug
|
||||
*/
|
||||
|
||||
#include "LUFA/Drivers/USB/USB.h"
|
||||
#include "Descriptors.h"
|
||||
|
||||
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
|
||||
{
|
||||
.Config =
|
||||
{
|
||||
.ControlInterfaceNumber = 0,
|
||||
|
||||
.DataINEndpointNumber = CDC_TX_EPNUM,
|
||||
.DataINEndpointSize = CDC_TXRX_EPSIZE,
|
||||
.DataINEndpointDoubleBank = true,
|
||||
|
||||
.DataOUTEndpointNumber = CDC_RX_EPNUM,
|
||||
.DataOUTEndpointSize = CDC_TXRX_EPSIZE,
|
||||
.DataOUTEndpointDoubleBank = true,
|
||||
|
||||
.NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
|
||||
.NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
|
||||
.NotificationEndpointDoubleBank = false,
|
||||
},
|
||||
};
|
13
cdc_device_definition.h
Normal file
13
cdc_device_definition.h
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* cdc_device_definition.h
|
||||
*
|
||||
* Created on: Dec 26, 2011
|
||||
* Author: Doug
|
||||
*/
|
||||
|
||||
#ifndef CDC_DEVICE_DEFINITION_H_
|
||||
#define CDC_DEVICE_DEFINITION_H_
|
||||
|
||||
extern USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface;
|
||||
|
||||
#endif /* CDC_DEVICE_DEFINITION_H_ */
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "usb_serial.h"
|
||||
#include "../LUFA/Drivers/USB/USB.h"
|
||||
#include "../Descriptors.h"
|
||||
#include "../cdc_device_definition.h"
|
||||
#include "../external_mem.h"
|
||||
#include "../tests/simm_electrical_test.h"
|
||||
#include "../programmer_protocol.h"
|
||||
@ -22,26 +22,6 @@
|
||||
#error Write chunk size should be a multiple of 4 bytes
|
||||
#endif
|
||||
|
||||
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
|
||||
{
|
||||
.Config =
|
||||
{
|
||||
.ControlInterfaceNumber = 0,
|
||||
|
||||
.DataINEndpointNumber = CDC_TX_EPNUM,
|
||||
.DataINEndpointSize = CDC_TXRX_EPSIZE,
|
||||
.DataINEndpointDoubleBank = true,
|
||||
|
||||
.DataOUTEndpointNumber = CDC_RX_EPNUM,
|
||||
.DataOUTEndpointSize = CDC_TXRX_EPSIZE,
|
||||
.DataOUTEndpointDoubleBank = true,
|
||||
|
||||
.NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
|
||||
.NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
|
||||
.NotificationEndpointDoubleBank = false,
|
||||
},
|
||||
};
|
||||
|
||||
void USBSerial_Init(void)
|
||||
{
|
||||
USB_Init();
|
||||
|
Loading…
Reference in New Issue
Block a user