CDC.cpp.diff

Sebastian Zehe, 2014-12-01 17:02

Download (1014 Bytes)

View differences:

CDC.cpp 2014-01-31 10:53:09.331100779 -0500
76 76
	return USB_SendControl(TRANSFER_PGM,&_cdcInterface,sizeof(_cdcInterface));
77 77
}
78 78

  
79
void WEAK lineCodingEvent(long baud, byte databits, byte parity, byte charFormat)
80
{
81
}
82

  
83
void WEAK lineStateEvent(byte linestate)
84
{
85
}
86

  
79 87
bool WEAK CDC_Setup(Setup& setup)
80 88
{
81 89
	u8 r = setup.bRequest;
......
95 103
		if (CDC_SET_LINE_CODING == r)
96 104
		{
97 105
			USB_RecvControl((void*)&_usbLineInfo,7);
106
			lineCodingEvent(_usbLineInfo.dwDTERate,
107
					_usbLineInfo.bDataBits,
108
					_usbLineInfo.bParityType,
109
					_usbLineInfo.bCharFormat);
98 110
			return true;
99 111
		}
100 112

  
......
102 114
		{
103 115
			_usbLineInfo.lineState = setup.wValueL;
104 116

  
117
			lineStateEvent(_usbLineInfo.lineState);
118

  
105 119
			// auto-reset into the bootloader is triggered when the port, already 
106 120
			// open at 1200 bps, is closed.  this is the signal to start the watchdog
107 121
			// with a relatively long period so it can finish housekeeping tasks