Skip to content

Commit 96022f2

Browse files
authored
Merge pull request #4 from mithro/master
Strip all whitespace on line endings.
2 parents fbb7abe + e9304c9 commit 96022f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3079
-3079
lines changed

inc/usb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
17-
To request to license the code under the MLA license (www.microchip.com/mla_license),
17+
To request to license the code under the MLA license (www.microchip.com/mla_license),
1818
please contact [email protected]
1919
*******************************************************************************/
2020
//DOM-IGNORE-END
@@ -57,7 +57,7 @@ please contact [email protected]
5757

5858
#include "usb_hal.h" // Hardware Abstraction Layer interface
5959

60-
/* USB Library version number. This can be used to verify in an application
60+
/* USB Library version number. This can be used to verify in an application
6161
specific version of the library is being used.
6262
*/
6363
#define USB_MAJOR_VER 2 // Firmware version, major release number.

inc/usb_ch9.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
17-
To request to license the code under the MLA license (www.microchip.com/mla_license),
17+
To request to license the code under the MLA license (www.microchip.com/mla_license),
1818
please contact [email protected]
1919
*******************************************************************************/
2020
//DOM-IGNORE-END
@@ -179,7 +179,7 @@ typedef struct __attribute__ ((packed)) _USB_ENDPOINT_DESCRIPTOR
179179
#define EP_SM_PKT_BULK_FS 8 // Small full-speed bulk packet
180180

181181
/* Descriptor IDs
182-
The descriptor ID type defines the information required by the HOST during a
182+
The descriptor ID type defines the information required by the HOST during a
183183
GET_DESCRIPTOR request
184184
*/
185185
typedef struct
@@ -521,7 +521,7 @@ typedef union __attribute__ ((packed))
521521
/********************************************************************
522522
USB Endpoint Definitions
523523
USB Standard EP Address Format: DIR:X:X:X:EP3:EP2:EP1:EP0
524-
This is used in the descriptors.
524+
This is used in the descriptors.
525525
********************************************************************/
526526
#define _EP_IN 0x80
527527
#define _EP_OUT 0x00

inc/usb_common.h

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
17-
To request to license the code under the MLA license (www.microchip.com/mla_license),
17+
To request to license the code under the MLA license (www.microchip.com/mla_license),
1818
please contact [email protected]
1919
*******************************************************************************/
2020
//DOM-IGNORE-END
@@ -213,110 +213,110 @@ typedef enum
213213
EVENT_HOST_STACK_BASE = 100,
214214

215215
// A USB hub has been attached. Hub support is not currently available.
216-
EVENT_HUB_ATTACH,
217-
216+
EVENT_HUB_ATTACH,
217+
218218
// A stall has occurred. This event is not used by the Host stack.
219-
EVENT_STALL,
220-
219+
EVENT_STALL,
220+
221221
// VBus SRP Pulse, (VBus > 2.0v), Data: uint8_t Port Number (For future support)
222-
EVENT_VBUS_SES_REQUEST,
223-
224-
// The voltage on Vbus has dropped below 4.4V/4.7V. The application is
222+
EVENT_VBUS_SES_REQUEST,
223+
224+
// The voltage on Vbus has dropped below 4.4V/4.7V. The application is
225225
// responsible for monitoring Vbus and calling USBHostVbusEvent() with this
226226
// event. This event is not generated by the stack.
227-
EVENT_VBUS_OVERCURRENT,
228-
227+
EVENT_VBUS_OVERCURRENT,
228+
229229
// An enumerating device is requesting power. The data associated with this
230-
// event is of the data type USB_VBUS_POWER_EVENT_DATA. Note that
230+
// event is of the data type USB_VBUS_POWER_EVENT_DATA. Note that
231231
// the requested current is specified in 2mA units, identical to the power
232232
// specification in a device's Configuration Descriptor.
233-
EVENT_VBUS_REQUEST_POWER,
234-
233+
EVENT_VBUS_REQUEST_POWER,
234+
235235
// Release power from a detaching device. The data associated with this
236236
// event is of the data type USB_VBUS_POWER_EVENT_DATA. The current value
237237
// specified in the data can be ignored.
238-
EVENT_VBUS_RELEASE_POWER,
239-
240-
// The voltage on Vbus is good, and the USB OTG module can be powered on.
241-
// The application is responsible for monitoring Vbus and calling
242-
// USBHostVbusEvent() with this event. This event is not generated by the
238+
EVENT_VBUS_RELEASE_POWER,
239+
240+
// The voltage on Vbus is good, and the USB OTG module can be powered on.
241+
// The application is responsible for monitoring Vbus and calling
242+
// USBHostVbusEvent() with this event. This event is not generated by the
243243
// stack. If the application issues an EVENT_VBUS_OVERCURRENT, then no
244244
// power will be applied to that port, and no device can attach to that
245245
// port, until the application issues the EVENT_VBUS_POWER_AVAILABLE for
246246
// the port.
247-
EVENT_VBUS_POWER_AVAILABLE,
248-
247+
EVENT_VBUS_POWER_AVAILABLE,
248+
249249
// The attached device is not supported by the application. The attached
250250
// device is not allowed to enumerate.
251-
EVENT_UNSUPPORTED_DEVICE,
252-
251+
EVENT_UNSUPPORTED_DEVICE,
252+
253253
// Cannot enumerate the attached device. This is generated if communication
254254
// errors prevent the device from enumerating.
255-
EVENT_CANNOT_ENUMERATE,
256-
257-
// The client driver cannot initialize the the attached device. The
255+
EVENT_CANNOT_ENUMERATE,
256+
257+
// The client driver cannot initialize the the attached device. The
258258
// attached is not allowed to enumerate.
259-
EVENT_CLIENT_INIT_ERROR,
260-
259+
EVENT_CLIENT_INIT_ERROR,
260+
261261
// The Host stack does not have enough heap space to enumerate the device.
262262
// Check the amount of heap space allocated to the application. In MPLAB,
263263
// select Project> Build Options...> Project. Select the appropriate
264264
// linker tab, and inspect the "Heap size" entry.
265-
EVENT_OUT_OF_MEMORY,
266-
265+
EVENT_OUT_OF_MEMORY,
266+
267267
// Unspecified host error. (This error should not occur).
268-
EVENT_UNSPECIFIED_ERROR,
269-
268+
EVENT_UNSPECIFIED_ERROR,
269+
270270
// USB cable has been detached. The data associated with this event is the
271271
// address of detached device, a single uint8_t.
272-
EVENT_DETACH,
273-
272+
EVENT_DETACH,
273+
274274
// A USB transfer has completed. The data associated with this event is of
275275
// the data type HOST_TRANSFER_DATA if the event is generated from the host
276276
// stack.
277277
EVENT_TRANSFER,
278-
278+
279279
// A USB Start of Frame token has been received. This event is not
280280
// used by the Host stack.
281-
EVENT_SOF,
282-
281+
EVENT_SOF,
282+
283283
// Device-mode resume received. This event is not used by the Host stack.
284284
EVENT_RESUME,
285-
285+
286286
// Device-mode suspend/idle event received. This event is not used by the
287287
// Host stack.
288288
EVENT_SUSPEND,
289-
290-
// Device-mode bus reset received. This event is not used by the Host
291-
// stack.
292-
EVENT_RESET,
293-
289+
290+
// Device-mode bus reset received. This event is not used by the Host
291+
// stack.
292+
EVENT_RESET,
293+
294294
// In Host mode, an isochronous data read has completed. This event will only
295295
// be passed to the DataEventHandler, which is only utilized if it is defined.
296-
// Note that the DataEventHandler is called from within the USB interrupt, so
296+
// Note that the DataEventHandler is called from within the USB interrupt, so
297297
// it is critical that it return in time for the next isochronous data packet.
298298
EVENT_DATA_ISOC_READ,
299-
299+
300300
// In Host mode, an isochronous data write has completed. This event will only
301-
// be passed to the DataEventHandler, which is only utilized if it is defined.
302-
// Note that the DataEventHandler is called from within the USB interrupt, so
301+
// be passed to the DataEventHandler, which is only utilized if it is defined.
302+
// Note that the DataEventHandler is called from within the USB interrupt, so
303303
// it is critical that it return in time for the next isochronous data packet.
304304
EVENT_DATA_ISOC_WRITE,
305-
305+
306306
// In Host mode, this event gives the application layer the option to reject
307307
// a client driver that was selected by the stack. This is needed when multiple
308-
// devices are supported by class level support, but one configuration and client
308+
// devices are supported by class level support, but one configuration and client
309309
// driver is preferred over another. Since configuration number is not guaranteed,
310-
// the stack cannot do this automatically. This event is issued only when
311-
// looking through configuration descriptors; the driver selected at the device
312-
// level cannot be overridden, since there shouldn't be any other options to
310+
// the stack cannot do this automatically. This event is issued only when
311+
// looking through configuration descriptors; the driver selected at the device
312+
// level cannot be overridden, since there shouldn't be any other options to
313313
// choose from.
314314
EVENT_OVERRIDE_CLIENT_DRIVER_SELECTION,
315315

316316
// In host mode, this event is thrown for every millisecond that passes. Like all
317317
// events, this is thrown from the USBHostTasks() or USBTasks() routine so its
318318
// timeliness will be determined by the rate that these functions are called. If
319-
// they are not called very often, then the 1ms events will build up and be
319+
// they are not called very often, then the 1ms events will build up and be
320320
// dispatched as the USBTasks() or USBHostTasks() functions are called (one event
321321
// per call to these functions.
322322
EVENT_1MS,
@@ -327,7 +327,7 @@ typedef enum
327327
// up/down audio hardware.
328328
EVENT_ALT_INTERFACE,
329329

330-
// If the application layer must do things to the device before the device is
330+
// If the application layer must do things to the device before the device is
331331
// configured, they should be done at this point. The application layer should
332332
// return true to hold the USB state machine at this point, while any USB or other
333333
// processing continues. When the USB state machine can safely proceed, the application
@@ -342,19 +342,19 @@ typedef enum
342342
EVENT_HID_BASE = 600, // Offset for Human Interface Device class events
343343

344344
EVENT_PRINTER_BASE = 700, // Offset for Printer class events
345-
345+
346346
EVENT_CDC_BASE = 800, // Offset for CDC class events
347347

348348
EVENT_CHARGER_BASE = 900, // Offset for Charger client driver events.
349349

350350
EVENT_AUDIO_BASE = 1000, // Offset for Audio client driver events.
351-
351+
352352
EVENT_USER_BASE = 10000, // Add integral values to this event number
353353
// to create user-defined events.
354354

355355
// There was a transfer error on the USB. The data associated with this
356356
// event is of data type HOST_TRANSFER_DATA.
357-
EVENT_BUS_ERROR = INT_MAX
357+
EVENT_BUS_ERROR = INT_MAX
358358

359359
} USB_EVENT;
360360

@@ -399,7 +399,7 @@ This data structure is passed to the application layer when a client driver is
399399
select, in case multiple client drivers can support a particular device.
400400
*/
401401
typedef struct _override_client_driver_data
402-
{
402+
{
403403
uint16_t idVendor;
404404
uint16_t idProduct;
405405
uint8_t bDeviceClass;
@@ -438,26 +438,26 @@ stalled (ie. bit 0 = EP0, bit 1 = EP1, etc.)
438438
identified by the "event" parameter and may have associated
439439
data. If the higher layer was able to handle the event, it
440440
should return true. If not, it should return false.
441-
441+
442442
Preconditions:
443443
USBInitialize must have been called to initialize the USB SW
444444
Stack.
445-
445+
446446
Parameters:
447447
USB_EVENT event - Identifies the bus event that occurred
448448
void *data - Pointer to event-specific data
449449
unsigned int size - Size of the event-specific data
450-
450+
451451
Return Values:
452452
None
453-
453+
454454
Remarks:
455455
The function is name is defined by the layer that implements
456456
it. A pointer to the function will be placed by into a table
457457
that the lower-layer will use to call it. This requires the
458458
function to use a specific call "signature" (return data type
459459
and values and data parameter types and values).
460-
460+
461461
*******************************************************************************/
462462

463463
typedef bool (*USB_EVENT_HANDLER) ( USB_EVENT event, void *data, unsigned int size );

0 commit comments

Comments
 (0)