Netcruzer Library API  V2.03
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
nz_serUSB.h File Reference

This file defines a buffered USB Interface. More...

Go to the source code of this file.

Detailed Description

This file defines a buffered USB Interface.

Author
Modtronix Engineering
Compiler:
MPLAB XC16

Description

This file defines a Buffered USB interface. The implementation has to be done in a separate c file by creating instances of these functions. The Netcruzer library contains a default implementations, nz_serUSB.c. To use the buffered USB module, the following must be done:

  • Copy Configuration section below to projdefs.h file.
  • In this "Configuration" section, uncomment disired lines, and change any default values as needed.
  • Add the nz_serUSB.c default implementation to the MPLAB project, or create a new implementation if the functionality should be changed.
  • The functions defined in this file can now be used in the project.

Configuration

The following defines are used to configure this module, and should be placed in projdefs.h. Note that all items marked [-DEFAULT-] are defaults, and do not have to be placed in projdefs.h if they contain desired configuration! For details, see Project Configuration.

// *********************************************************************
// -------------- USB Configuration (nz_serUSB.h) -----------------
// *********************************************************************
//System will initialize and manage a USB port. We have to add an implementation to project (like nz_serUSB.c)
#define NZ_USBHID_ENABLE
//#define NZ_USBCDC_ENABLE
//If set to 1, the system LED is controlled by the nz_serUSB module
#define USB_CONTROLS_SYSLED ( 1 )
//Indicates if this application handles commands via USB. When defined, the application must implement the "nz_cmdXxx" callback functions!
#define APP_HANDLES_USB_COMMANDS

Software License Agreement

The software supplied herewith is owned by Modtronix Engineering, and is protected under applicable copyright laws. The software supplied herewith is intended and supplied to you, the Company customer, for use solely and exclusively on products manufactured by Modtronix Engineering. The code may be modified and can be used free of charge for commercial and non commercial applications. All rights are reserved. Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license.

THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

File History

2010-10-11, David H. (DH):

  • Initial version