PT66EI-10P Driver Functions. More...
Go to the source code of this file.
PT66EI-10P Driver Functions.
This file includes hardware specific defines for the PT66EI-10P board. This board has 2 iMod ports allowing many different iMod modules to be added. The pins of the iMod ports can be configured, read and written using functions defined in this file.
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.
To use the PT66EI-10P with iMod modules in a project, the following must be done:
For example, if the im2BL (2 buttons and LEDs) is mounted in iMod port 1, and the im4MOS (4 MOSFET outputs) is mounted in iMod port 2, the following code is required:
This code will make iMod specific functions available for the defined modules. These functions will appear in MPLAB X as code completion suggestions if the module name is types. For the example above, if "im2bl_" is typed in the editor, and "Control-Space" pressed (code completion), all available im2BL functions for iMod port 1 are shown, like:
To configure an iMod port pin as an input or output, the ConfDirPin functions are provided. For example:
To write or read to/from an iMod port pin, the WritePin and ReadPin functions are provided. For example:
To enable or disable pull-up and pull-down resistors on iMod port pins, the ConfPullupPin and ConfPulldownPin functions are provided. For example:
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
2012-02-22, David Hosken (DH):