Definition:
Parameters:
| addr | - | IIC address of the specified GPM. |
| dir | - | Direction bits for the digital IO port. |
Return Value:
This routine does not return a value.
Description:
This routine sets the direction bits of the digital IO port on a GPM. The lower 4 bits are the direction bits. Setting a bit makes the corresponding pin an input. Clearing a bit makes the corresponding pin an output. See the documentation for the GPS Module for more details regarding GPM registers and functions.
| Note: | This routine is defined as a macro that calls the aI2C_WriteChar routine. |
Example:
#include <aGPM.tea>
aGPM_SetPortDir((unsigned char)0xD0, 0x03);
This would configure digital IO pins 0 and 1 as inputs and digital IO pins 2 and 3 as outputs on the GPM.
Related:
aGPM_Get2DigitInt, aGPM_Get3DigitInt, aGPM_GetYear, aGPM_GetAltitude, aGPM_GetAnalogInput, aGPM_GetHours, aGPM_GetMinutes, aGPM_GetSeconds, aGPM_GetDay, aGPM_GetMonth, aGPM_GetLatitudeDegrees, aGPM_GetLatitudeMinutes, aGPM_GetLatitudeFrac, aGPM_GetLatitudeDirChar, aGPM_GetLongitudeDegrees, aGPM_GetLongitudeMinutes, aGPM_GetLongitudeFrac, aGPM_GetLongitudeDirChar, aGPM_GetGPSQuality, aGPM_GetSatellitesInUse, aGPM_GetHDOP, aGPM_GetTrueHeading, aGPM_GetTrueHeadingFrac, aGPM_GetMagHeading, aGPM_GetMagHeadingFrac, aGPM_GetSpeed, aGPM_GetSpeedFrac, aGPM_GetSatelliteID, aGPM_GetSatelliteSignalLevel, aGPM_GetDigitalIO, aGPM_GetPosFoundFlag, aGPM_GetStatus, aGPM_SetPortBits
version: 1.0, build 80903
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado. All rights reserved.