API Guide Home (Online version only) |

# PmConnectorLib.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  *****************************************************************************/
    00005 /**
    00006  * @ingroup PmConnectorLib
    00007  */
    00008
    00009 /**
    00010  * @file  PmConnectorLib.h
    00011  * @brief palmOne library that exports multi-connector related APIs.
    00012  *
    00013  */
    00014
    00015 #ifndef __PMCONNECTORLIB_H__
    00016 #define __PMCONNECTORLIB_H__
    00017
    00018
    00019 #include <Common/Libraries/PmConnectorLib/PmConnectorLibCommon.h>
    00020
    00021 // To Define when building the library
    00022 #if (CPU_TYPE != CPU_68K) || (defined BUILDING_PMCONNECTOR_LIB)
    00023     #define PMCONNECTOR_LIB_TRAP(trapNum)
    00024 #else
    00025     #include <LibTraps.h>
    00026     #define PMCONNECTOR_LIB_TRAP(trapNum) SYS_TRAP(trapNum)
    00027 #endif
    00028
    00029
    00030 /********************************************************************
    00031  * Prototypes
    00032  ********************************************************************/
    00033 #ifdef __cplusplus
    00034 extern "C" {
    00035 #endif
    00036
    00037 /**
    00038  * @brief Standard library open routine
    00039  *
    00040  * @param refNum:   IN: library reference number
    00041  * @retval Err Error code.
    00042  */
    00043 Err
    00044 PmConnectorLibOpen (UInt16 refNum)
    00045       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapOpen);
    00046
    00047 /**
    00048  * @brief Standard library close routine
    00049  *
    00050  * @param refNum:   IN: library reference number
    00051  * @retval Err Error code.
    00052  */
    00053 Err
    00054 PmConnectorLibClose (UInt16 refNum)
    00055       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapClose);
    00056
    00057 /**
    00058  * @brief Standard library sleep routine
    00059  *
    00060  * @param refNum:   IN: library reference number
    00061  * @retval Err Error code.
    00062  */
    00063 Err
    00064 PmConnectorLibSleep (UInt16 refNum)
    00065       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapSleep);
    00066
    00067 /**
    00068  * @brief Standard library wake routine
    00069  *
    00070  * @param refNum:   IN: library reference number
    00071  * @retval Err Error code.
    00072  */
    00073 Err
    00074 PmConnectorLibWake (UInt16 refNum)
    00075       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapWake);
    00076
    00077 /**
    00078  * @brief Checks the version of the library present on the device
    00079  *
    00080  * @param refNum:       IN: library reference number
    00081  * @param sdkVersion:   IN: sdkVersion defined in the common header file
    00082  * @param LibVersionP:  IN: version of the library on the device
    00083  * @retval Err Error code. Function returns error when it finds incompatible library
    00084  */
    00085 Err
    00086 PmConnectorLibGetVersion (UInt16 refNum, UInt32 sdkVersion, UInt32 *LibVersionP)
    00087       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapGetVersion);
    00088
    00089 /**
    00090  * @brief Controls the pins on the connector. Currently supports power on and off
    00091  *
    00092  * @param refNum:   IN: library reference number
    00093  * @param cmdId:    IN: type of control. @see PmConnectorLibControlType
    00094  * @param parmP:    IN: contains the value needed depending on type of control
    00095  * @retval Err Error code.
    00096  */
    00097 Err
    00098 PmConnectorLibControl (UInt16 refNum, UInt16 cmdId, void *parmP)
    00099       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapControl);
    00100
    00101 /**
    00102  * @brief Targets audio output to different audio peripherals.
    00103  *
    00104  * @param refNum            IN: library reference number
    00105  * @param outputSetting:    IN: audio capabilities (headphone, speaker, etc)
    00106  * @retval Err Error code.
    00107  */
    00108 Err
    00109 PmConnectorLibSetAudioOutput(UInt16 refNum, PmConnectorAudioOutputSettingType outputSetting)
    00110       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapSetAudioOutput);
    00111
    00112 /**
    00113  * @brief Targets audio input from different audio peripherals.
    00114  *
    00115  * @param refNum            IN: library reference number
    00116  * @param inputSetting:    IN: audio capabilities (headset etc)
    00117  * @retval Err Error code.
    00118  */
    00119 Err
    00120 PmConnectorLibSetAudioInput(UInt16 refNum, PmConnectorAudioInputSettingType inputSetting)
    00121       PMCONNECTOR_LIB_TRAP (kPmConnectorLibTrapSetAudioInput);
    00122
    00123
    00124 //
    00125 // To maintain the same dispatch entry as the MDF the next customcontrol should be  (sysLibTrapCustom + 6)
    00126 //
    00127 #ifdef __cplusplus
    00128 }
    00129 #endif
    00130
    00131
    00132 #endif  // __PMCONNECTORLIB_H__

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:55 2008 for Palm API Guide