JSAPI.h File Reference


Detailed Description

API Version 0.8

This API is supported on six Juniper Systems platforms:

Some of the functions in this API do not apply on all platforms. Calling these functions will return ERROR_NOT_SUPPORTED. The intent of this is so that developers might be able to write programs for all our products using the same header and library file.

Older products do not have as many functions. Trying to load an application that calls a function that does not exist on an older product will result in a message that says it is not a valid Pocket PC Application.

The "JS" functions all return a DWORD that indicates the success status of the function call. Most likely, the return value will be one of:

Go to the source code of this file.

Classes

struct  A2_JSAPI_DEVICE_INFO
struct  ALLEGRO_BATTERY_INFO
struct  JS_EXP_RADIO_INFO
struct  JS_RADIO_INFO
struct  MESA_BATTERY_INFO
struct  MESA_DEVICE_INFO
struct  MESA_I2C_INFO
struct  MESA_SCCB_INFO
struct  TK6000_BATTERY_INFO

Defines

#define ARCHER_BATTERY_INFO   ALLEGRO_BATTERY_INFO
#define BATTERY_1_CHARGING   0x04
#define BATTERY_1_PRESENT   0x08
#define BATTERY_2_CHARGING   0x01
#define BATTERY_2_PRESENT   0x02
#define BATTERY_ALKALINE   0x02
#define BATTERY_CHARGEKNOWN   0x10
#define BATTERY_CHARGING   0x04
#define BATTERY_PRESENT   0x08
#define BATTERY_VEHICLEMODE   0x01
#define BLUETOOTH_115200   2
#define BLUETOOTH_921600   1
#define BLUETOOTH_NOT_PRESENT   0
#define DOCK_EVENT_NAME   L"JS_DOCK_EVENT"
#define EXP_GPIO_INTR_AND_WAKE   15
#define EXP_IRQ_EDGE_BOTH   0x0030
#define EXP_IRQ_EDGE_FALL   0x0020
#define EXP_IRQ_EDGE_MASK   0x0070
#define EXP_IRQ_EDGE_NONE   0x0040
#define EXP_IRQ_EDGE_RISE   0x0010
#define EXP_PULL_DOWN_360K   0xC0
#define EXP_PULL_KEEPER   0x80
#define EXP_PULL_NONE   0
#define EXP_PULL_UP_100K   0xE0
#define EXP_PULL_UP_22K   0xF0
#define EXP_PULL_UP_75K   0xD0
#define EXP_SUSPEND_STATE_IN_100K_PU   7
#define EXP_SUSPEND_STATE_IN_22K_PU   8
#define EXP_SUSPEND_STATE_IN_360K_PD   5
#define EXP_SUSPEND_STATE_IN_75K_PU   6
#define EXP_SUSPEND_STATE_IN_PKEEP   4
#define EXP_SUSPEND_STATE_IN_PNONE   3
#define EXP_SUSPEND_STATE_KEEPER   0
#define EXP_SUSPEND_STATE_OUT_HIGH   2
#define EXP_SUSPEND_STATE_OUT_LOW   1
#define GPIO_BIT_RI_POWER   0x40000000
#define GPIO_PULL_DEFAULT   0x0000
#define GPIO_PULL_DOWN   0xA000
#define GPIO_PULL_MASK   0xE000
#define GPIO_PULL_NEITHER   0x8000
#define GPIO_PULL_UP   0xC000
#define GPIO_SUSPEND_INPUT   0x280
#define GPIO_SUSPEND_KEEPER   0x380
#define GPIO_SUSPEND_MASK   0x380
#define GPIO_SUSPEND_OUTPUT_HI   0x300
#define GPIO_SUSPEND_OUTPUT_LO   0x200
#define GPS_EVENT_DEFAULT_NAME   L"JS_GPS_1HZ_SIGNAL"
#define IRQ_EVENT_DEFAULT_NAME   L"EXP_IRQ_EVENT"
#define JS_SHIME_MODE_FKEY   1
#define JS_SHIME_MODE_FKEY_LOCK   2
#define JS_SHIME_MODE_NONE   0
#define LED_A2_BLUE_ON   LED_BLUE
#define LED_A2_BLUE_PRIOR   0x20
#define LED_A2_BLUE_USER   0x10
#define LED_A2_GREEN_ON   LED_GREEN
#define LED_A2_GREEN_USER   0x08
#define LED_AMBER   0x03
#define LED_BLUE   0x04
#define LED_GREEN   0x02
#define LED_MESA_MASK   0x06
#define LED_OFF   0x00
#define LED_RED   0x01
#define MESA_COM1_CTS   MESA_EXP_GPIO_2
#define MESA_COM1_DCD   MESA_EXP_GPIO_3
#define MESA_COM1_DSR   MESA_EXP_GPIO_4
#define MESA_COM1_DTR   MESA_EXP_GPIO_6
#define MESA_COM1_MASK   0x000000FF
#define MESA_COM1_RI   MESA_EXP_GPIO_5
#define MESA_COM1_RTS   MESA_EXP_GPIO_7
#define MESA_COM1_RXD   MESA_EXP_GPIO_0
#define MESA_COM1_TXD   MESA_EXP_GPIO_1
#define MESA_COM3_CTS   MESA_EXP_GPIO_16
#define MESA_COM3_MASK   0x0001E000
#define MESA_COM3_RTS   MESA_EXP_GPIO_13
#define MESA_COM3_RXD   MESA_EXP_GPIO_14
#define MESA_COM3_TXD   MESA_EXP_GPIO_15
#define MESA_EXP_GPIO_0   0x00000001
#define MESA_EXP_GPIO_1   0x00000002
#define MESA_EXP_GPIO_10   0x00000400
#define MESA_EXP_GPIO_11   0x00000800
#define MESA_EXP_GPIO_12   0x00001000
#define MESA_EXP_GPIO_13   0x00002000
#define MESA_EXP_GPIO_14   0x00004000
#define MESA_EXP_GPIO_15   0x00008000
#define MESA_EXP_GPIO_16   0x00010000
#define MESA_EXP_GPIO_2   0x00000004
#define MESA_EXP_GPIO_3   0x00000008
#define MESA_EXP_GPIO_4   0x00000010
#define MESA_EXP_GPIO_5   0x00000020
#define MESA_EXP_GPIO_6   0x00000040
#define MESA_EXP_GPIO_7   0x00000080
#define MESA_EXP_GPIO_8   0x00000100
#define MESA_EXP_GPIO_9   0x00000200
#define MESA_GPIO_FLASH   MESA_EXP_GPIO_8
#define MESA_GPIO_MASK   0x0001FFFF
#define MESA_NUM_GPIO   17
#define MESA_SPI_CLK   MESA_EXP_GPIO_9
#define MESA_SPI_CSB   MESA_EXP_GPIO_10
#define MESA_SPI_MASK   0x00001E00
#define MESA_SPI_MISO   MESA_EXP_GPIO_12
#define MESA_SPI_MOSI   MESA_EXP_GPIO_11
#define MESA_STATUS_BAT1_BQ_OK   0x00100000
#define MESA_STATUS_BAT1_CHARGE_ERROR   0x08000000
#define MESA_STATUS_BAT1_CHARGING   0x00004000
#define MESA_STATUS_BAT1_CONNECTED   0x00001000
#define MESA_STATUS_BAT1_OK_TO_CHARGE   0x02000000
#define MESA_STATUS_BAT1_PRESENT   0x00000200
#define MESA_STATUS_BAT2_BQ_OK   0x00200000
#define MESA_STATUS_BAT2_CHARGE_ERROR   0x10000000
#define MESA_STATUS_BAT2_CHARGING   0x00008000
#define MESA_STATUS_BAT2_CONNECTED   0x00002000
#define MESA_STATUS_BAT2_OK_TO_CHARGE   0x04000000
#define MESA_STATUS_BAT2_PRESENT   0x00000400
#define MESA_STATUS_EXT_POWER_CONNECTED   0x00000800
#define MESA_STATUS_EXT_POWER_PRESENT   0x00000100
#define MODULES_PRESENT_BLUETOOTH   0x00000001
#define MODULES_PRESENT_CAMERA   0x00000008
#define MODULES_PRESENT_CDMA   0x00000040
#define MODULES_PRESENT_FLASH   0x00000020
#define MODULES_PRESENT_GPS   0x00000004
#define MODULES_PRESENT_GSM   0x00000010
#define MODULES_PRESENT_OV5640_CAMERA   0x00000080
#define MODULES_PRESENT_WIFI   0x00000002
#define POWER_BATTERY   1
#define POWER_CURRENT   0
#define POWER_EXTERNAL   2
#define PROC_SPEED_208   2
#define PROC_SPEED_312   3
#define PROC_SPEED_416   4
#define PROC_SPEED_520   5
#define PROC_SPEED_624   6
#define PROC_SPEED_AR2_1000   1000
#define PROC_SPEED_AR2_760   760
#define PROC_SPEED_AUTO   99
#define PROC_SPEED_PERFORMANCE   97
#define PROC_SPEED_POWER_SAVE   98
#define PWR_CLEAN_BOOT_ALL   7
#define PWR_CLEAN_BOOT_REGISTRY   6
#define PWR_CLEAN_BOOT_ROOT   4
#define PWR_CLEAN_BOOT_STORAGE   5
#define PWR_POWER_OFF   3
#define PWR_RESET   2
#define PWR_SUSPEND   1
#define VK_OEM_F1   0xE9
#define VK_OEM_F10   0xF2
#define VK_OEM_F11   0xF3
#define VK_OEM_F12   0xF4
#define VK_OEM_F2   0xEA
#define VK_OEM_F3   0xEB
#define VK_OEM_F4   0xEC
#define VK_OEM_F5   0xED
#define VK_OEM_F6   0xEE
#define VK_OEM_F7   0xEF
#define VK_OEM_F8   0xF0
#define VK_OEM_F9   0xF1
#define VOLUME_MDOC_USER   1

Functions

DWORD JSFormatVolume (DWORD dwVolumeId)
DWORD JSGetAmbientTemp (DWORD *pdwTemp)
DWORD JSGetBacklightBrightness (DWORD *pdwLCDBright, DWORD dwPower)
DWORD JSGetBacklightState (DWORD *pdwEnable)
DWORD JSGetBatteryStatus (VOID *pBattInfo, DWORD *pdwSize)
DWORD JSGetBluetoothOverrideState (DWORD *pdwEnable)
DWORD JSGetCellModemPower (DWORD *pdwPowerState)
DWORD JSGetContrast (DWORD *pdwContrast)
DWORD JSGetDeviceInfo (VOID *pDeviceInfo, DWORD *pdwSize)
DWORD JSGetDisplayType (DWORD *pdwDispType)
DWORD JSGetDockStatus (BOOL *pfDocked)
DWORD JSGetExp2GPIOWakeSource (DWORD *pdwEnable)
DWORD JSGetExpansionPower (DWORD *pdwOn)
DWORD JSGetExpIRQState (DWORD *pdwExpIRQState)
DWORD JSGetGPIO (DWORD *pdwGPIOLevel)
DWORD JSGetGPIOAltState (DWORD *pdwGPIOAltState)
DWORD JSGetGPIODirection (DWORD *pdwGPIODirection)
DWORD JSGetGPIOPull (DWORD dwGPIO, DWORD *pdwGPIOPullDirection)
DWORD JSGetGPIOSuspend (DWORD dwGPIO, DWORD *pdwSuspendState)
DWORD JSGetI2CRegister (VOID *pI2CInfo, DWORD dwSize)
DWORD JSGetKeyboardCustomMode (DWORD *pdwKeyboardMode)
DWORD JSGetLEDStatus (DWORD *pdwLEDStatus)
DWORD JSGetPlatformName (TCHAR *szDeviceString, DWORD *pdwLen)
DWORD JSGetPort (DWORD dwPortNumber, DWORD *pdwPortValue)
DWORD JSGetProcessorSpeed (DWORD *pdwProcSpeedCode)
DWORD JSGetRadioInfo (VOID *pRadioInfo, DWORD *pdwSize)
DWORD JSGetRingInPower (DWORD *pdwOn)
DWORD JSGetSerialNumber (TCHAR *szSerialString, DWORD *pdwLen)
DWORD JSGetStickyKeyBrightness (DWORD *pdwKeyBright, DWORD dwPower)
DWORD JSGetTouchScreenState (DWORD *pdwEnable)
DWORD JSGetWifiPower (DWORD *pdwState)
DWORD JSInitInterrupt (DWORD dwTrigger)
DWORD JSSetBacklightBrightness (DWORD dwLCDBright, DWORD dwPower)
DWORD JSSetBacklightState (DWORD dwEnable)
DWORD JSSetBluetoothOverrideState (DWORD dwEnable)
DWORD JSSetCellModemPower (DWORD dwPowerState)
DWORD JSSetContrast (DWORD dwContrast)
DWORD JSSetExp2GPIOWakeSource (DWORD dwEnable)
DWORD JSSetExpansionPower (DWORD dwOn)
DWORD JSSetExpIRQState (DWORD dwExpIRQState)
DWORD JSSetGPIO (DWORD dwGPIOLevel, DWORD dwMask)
DWORD JSSetGPIOAltState (DWORD dwGPIOAltState, DWORD dwMask)
DWORD JSSetGPIODirection (DWORD dwGPIODirection, DWORD dwMask)
DWORD JSSetGPIOPull (DWORD dwGPIO, DWORD dwPullDirection)
DWORD JSSetGPIOSuspend (DWORD dwGPIO, DWORD dwSuspendState)
DWORD JSSetI2CRegister (VOID *pI2CInfo, DWORD dwSize)
DWORD JSSetKeyboardCustomMode (DWORD dwKeyboardMode)
DWORD JSSetLEDStatus (DWORD dwLEDStatus)
DWORD JSSetLEDStatusEx (DWORD dwLEDStatus, DWORD dwMask)
DWORD JSSetPort (DWORD dwPortNumber, DWORD dwPortValue)
DWORD JSSetPower (DWORD dwPowerCode)
DWORD JSSetProcessorSpeed (DWORD dwProcSpeedCode)
DWORD JSSetRingInPower (DWORD dwOn)
DWORD JSSetStickyKeyBrightness (DWORD dwKeyBright, DWORD dwPower)
DWORD JSSetTouchScreenState (DWORD dwEnable)
DWORD JSSetWifiPower (DWORD dwState)
DWORD JSStopInterrupt ()


Define Documentation

#define ARCHER_BATTERY_INFO   ALLEGRO_BATTERY_INFO

This structure is used with the JSGetBatteryStatus function.

Because the both the Archer and Allegro MX each only have one battery, the Archer uses the same structure as the Allegro MX. However, only the BATTERY_PRESENT and BATTERY_CHARGING defines are used for the Flags. Also, the Battery_Capacity is reported from the smart chip inside the battery.

Supported Platforms:
  • Archer
See also:
JSGetBatteryStatus

#define DOCK_EVENT_NAME   L"JS_DOCK_EVENT"

Applications can register to receive notifications when the device is docked or undocked. This is a named event, and an application can subscribe to it by calling OpenEvent(). The application can then receive the notification of a change in the dock status by calling WaitForSingleObject(). After receiving the notification of a change in dock status, the current dock status can be determined by calling JSGetDockStatus().

Note:
Consult MSDN documentation for information on the use of OpenEvent() and WaitForSingleObject().
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetDockStatus

#define GPS_EVENT_DEFAULT_NAME   L"JS_GPS_1HZ_SIGNAL"

If the system has a GNSS receiver, a user application can register to receive notifications every second from the 1Hz GNSS pulse. The GNSS pulse is a named event, and an application can subscribe to it by calling OpenEvent(). Timing can then be synchronized with the pulse by calling WaitForSingleObject().

The default name for this event is in the registry under
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\GPS]
"PulseEventName"="JS_GPS_1HZ_SIGNAL"
It is configurable if a different name for the event is desired.

The thread that generates this event can be disabled by modifying the following registry value to 0
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\GPS]
"PulseEnable"=dword:1

Note:
Consult MSDN documentation for information on the use of OpenEvent() and WaitForSingleObject().
Supported Platforms:
  • Mesa


Function Documentation

DWORD JSFormatVolume ( DWORD  dwVolumeId  ) 

This function formats the specified volume. This is used to format the \Storage folder.

Parameters:
[in] dwVolumeId Identifier of the volume to be formatted. Can be the following value:
          VOLUME_MDOC_USER
Supported Platforms:
  • Allegro MX
  • TK6000
  • Archer

DWORD JSGetAmbientTemp ( DWORD *  pdwTemp  ) 

This function gets the signed ambient temperature in increments of 0.1 degrees Celsius.

Parameters:
[out] pdwTemp Ambient temperature filled in here.
Note:
This function is not supported on Archer. However, you can use JSGetBatteryStatus to determine the battery temperature.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2

DWORD JSGetBacklightBrightness ( DWORD *  pdwLCDBright,
DWORD  dwPower 
)

This function gets the backlight brightness.

Parameters:
[out] pdwLCDBright The current backlight brightness is filled in here. Range is from 0(off) to 255(full bright).
[in] dwPower Which power setting to retrieve the brightness setting for. There are three options: battery power setting, external power setting, or whichever one the device is currently running off of. The defines used for these three are:
          POWER_CURRENT
          POWER_BATTERY
          POWER_EXTERNAL
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetBacklightBrightness

DWORD JSGetBacklightState ( DWORD *  pdwEnable  ) 

This function retrieves the state of the backlight on battery power. It is assumed that if AC power is present, then the user would want the backlight on. There is not a similar state for AC power (except for zero brightness value).

Parameters:
[out] pdwEnable The state of the battery power backlight will be filled in here. This value will be 1 if it is enabled and 0 if it is disabled.
Supported Platforms:
  • Allegro MX
  • TK6000
See also:
JSSetBacklightState

DWORD JSGetBatteryStatus ( VOID *  pBattInfo,
DWORD *  pdwSize 
)

This function gets the current battery status. The battery structure to use depends on which platform you are using

Parameters:
[out] pBattInfo VOID pointer to the battery structure that will be filled out with data.
[in,out] pdwSize Size of the structure that you are using. This will get filled out with the size of the structure that is used or needed.
Note:
For Archer2 and Allegro2, use the Microsoft API GetSystemPowerStatusEx().
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
See also:
TK6000_BATTERY_INFO
ALLEGRO_BATTERY_INFO
ARCHER_BATTERY_INFO
MESA_BATTERY_INFO

DWORD JSGetBluetoothOverrideState ( DWORD *  pdwEnable  ) 

This function gets the Bluetooth override state for suspend/resume power functionality. If Bluetooth is off when the unit is suspended, then the Bluetooth radio will stay powered off while it is suspended regardless of the override state. By default (override state not set), if Bluetooth is on when the radio is suspended, then the radio will stay powered and the stack will remain loaded during suspend. If the override state is set, and Bluetooth is on when the unit is suspended, then the radio will power down and the stack will unload during suspend and power up after being resumed.

Parameters:
[out] pdwEnable The state of the Bluetooth override will be filled in here. This value will be 1 if it is enabled and 0 if it is disabled.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
See also:
JSSetBluetoothOverrideState

DWORD JSGetCellModemPower ( DWORD *  pdwPowerState  ) 

Queries the power state of the cellular modem. If the device does not have a cellular modem, the function will return ERROR_DEV_NOT_EXIST.

Parameters:
[out] pdwPowerState Receives the power state of the cellular modem. 1 means that the modem is ON. 0 means that the modem is OFF.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetCellModemPower

DWORD JSGetContrast ( DWORD *  pdwContrast  ) 

This function gets the current contrast value. This is only applicable for a monochrome screen. The higher the number, the more contrast (or darker) the screen is.

Parameters:
[out] pdwContrast The current contrast value is filled in here. Range is from 0 to 254.
Supported Platforms:
  • Allegro MX monochrome
See also:
JSSetContrast.

DWORD JSGetDeviceInfo ( VOID *  pDeviceInfo,
DWORD *  pdwSize 
)

This function gets information about the device.

Parameters:
[out] pDeviceInfo Cast a pointer to the MESA_DEVICE_INFO struct here for the device information to be filled in.
[in,out] pdwSize Size of the structure that you are using. This will get filled out with the size of the structure that is used or needed.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2

DWORD JSGetDisplayType ( DWORD *  pdwDispType  ) 

This function gets the display type connected to the device.

Parameters:
[out] pdwDispType Display type is filled in here. 1 is a color display, 0 is a monochrome display.
Note:
For TK6000, Archer, and Mesa this will always return 1.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2

DWORD JSGetDockStatus ( BOOL *  pfDocked  ) 

Queries whether or not the device is currently resting in the dock.

Parameters:
[out] pfDocked TRUE means that the device is currently in the dock. FALSE means that the device is currently NOT in the dock.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2

DWORD JSGetExp2GPIOWakeSource ( DWORD *  pdwEnable  ) 

This function gets the wake source state of expansion GPIO 2 (bit 2 of the GPIOs). This GPIO can be configured as a wake source to the processor.

Parameters:
[out] pdwEnable If expansion GPIO 2 is configured as a wake source, then this will be filled out as a 1. Otherwise it will be 0.
Supported Platforms:
  • TK6000
See also:
JSSetExp2GPIOWakeSource

DWORD JSGetExpansionPower ( DWORD *  pdwOn  ) 

This function gets the current expansion power.

Parameters:
[out] pdwOn Current expansion power is filled in here. 0 is off, 1 is on.
Supported Platforms:
  • TK6000
See also:
JSSetExpansionPower

DWORD JSGetExpIRQState ( DWORD *  pdwExpIRQState  ) 

This function gets the current configuration of the expansion header's interrupt line to be used as a wake-up source.

Parameters:
[out] pdwExpIRQState Receives the current wake-up edge configuration of the expansion header's interrupt line. It will be filled with one of the following values:
          EXP_IRQ_EDGE_RISE (Mesa)
          EXP_IRQ_EDGE_FALL (Mesa)
          EXP_IRQ_EDGE_BOTH (Mesa)
          EXP_IRQ_EDGE_NONE (Mesa)
          TRUE (Archer2 and Allegro2)
          FALSE (Archer2 and Allegro2)
Note:
On Archer2 and Allegro2 the GPIO that can be set as interrupt and wake source is EXP_GPIO_15. If set as a wake source, it will wake on whatever edge the interrupt is set up as.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetExpIRQState

DWORD JSGetGPIO ( DWORD *  pdwGPIOLevel  ) 

This function gets the level for the available expansion GPIOs regardless of pin direction. For Mesa there are 17 GPIOs available in bits 0 through 16. For Allegro, there are nine GPIOs available in bits 0 through 8. For TK6000, there are three GPIOs available in bits 0 through 2. For Archer2 and Allegro2, there are 16 GPIOs available in bits 0 through 15. On Archer2 and Allegro2, the GPIO must be configured for Function 0 (GPIO mode) to read the level. For pins that are not Function 0, a 0 will be reported.

Parameters:
[out] pdwGPIOLevel The level 0 (low) or 1 (high) is filled in for each available GPIO bit.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetGPIODirection
JSSetGPIODirection
JSSetGPIO

DWORD JSGetGPIOAltState ( DWORD *  pdwGPIOAltState  ) 

This functions identifies which GPIOs on the expansion header are operating in their alternate function.

Parameters:
[out] pdwGPIOAltState Receives a DWORD value containing information about all of the GPIOs on the expansion header. '0' means that the pin is operating as a normal GPIO. '1' means that the pin is operating in its alternate function.
Note:
For Archer2 and Allegro2, only GPIO mode (0) and Hardware mode (1) can be selected using JSAPI. Other alternate functions are available using the registry or through direct IOCTLs to the Expansion Driver. If one of these functions is set on GPIO xx, bit xx + 16 of *pdwGPIOAltState will be set. Example, if Exp_GPIO_02 is set to any function besides 0 or 1, then bit 18 (0x00040000) will be set.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetGPIOAltState

DWORD JSGetGPIODirection ( DWORD *  pdwGPIODirection  ) 

This function gets the direction for the available expansion GPIOs. For Mesa, there are 17 GPIOS available in bits 0 through 16. For Allegro, there are nine GPIOs available in bits 0 through 8. For TK6000, there are three GPIOs available in bits 0 through 2. For Archer2 and Allegro2, there are 16 GPIOs available in bits 0 through 15.

Parameters:
[out] pdwGPIODirection For each GPIO, the corresponding bit will be 0 for input and 1 for output.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetGPIODirection
JSGetGPIO
JSSetGPIO

DWORD JSGetGPIOPull ( DWORD  dwGPIO,
DWORD *  pdwGPIOPullDirection 
)

This function gets the pull direction of a GPIO pin on the expansion header

Parameters:
[in] dwGPIO Set the corresponding GPIO bit that you wish to retrieve the pull direction for. You can only get information about one pin at a time.
[out] pdwGPIOPullDirection Receives the pull direction for the specified pin. It will be set to one of the following values: one of the following values:
          GPIO_PULL_NEITHER (Mesa)
          GPIO_PULL_DOWN (Mesa)
          GPIO_PULL_UP (Mesa)
          EXP_PULL_NONE (Archer2 and Allegro2)
          EXP_PULL_KEEPER (Archer2 and Allegro2)
          EXP_PULL_DOWN_360K (Archer2 and Allegro2)
          EXP_PULL_UP_100K (Archer2 and Allegro2)
          EXP_PULL_UP_75K (Archer2 and Allegro2)
          EXP_PULL_UP_22K (Archer2 and Allegro2)
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetGPIOPull

DWORD JSGetGPIOSuspend ( DWORD  dwGPIO,
DWORD *  pdwSuspendState 
)

This function gets the suspend behavior of a GPIO pin on the expansion header

Parameters:
[in] dwGPIO Set the corresponding GPIO bit that you wish to retrieve the suspend behavior for. You can only get information about one pin at a time.
[out] pdwSuspendState Receives the suspend behavior for the specified pin. It will be filled with one of the following values:
          GPIO_SUSPEND_INPUT (Mesa)
          GPIO_SUSPEND_OUTPUT_LO (Mesa)
          GPIO_SUSPEND_OUTPUT_HI (Mesa)
          GPIO_SUSPEND_KEEPER (Mesa)
          EXP_SUSPEND_STATE_KEEPER (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_OUT_LOW (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_OUT_HIGH (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_PNONE (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_PKEEP (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_360K_PD (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_75K_PU (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_100K_PU (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_22K_PU (Archer2 and Allegro2)
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetGPIOSuspend

DWORD JSGetI2CRegister ( VOID *  pI2CInfo,
DWORD  dwSize 
)

This functions gets the contents of an I2C Register

Parameters:
[in,out] pI2CInfo Pointer to one of the following data types:
          MESA_I2C_INFO
          MESA_SCCB_INFO
The slaveAddress and registerAddress members must be filled with the desired addresses before this function is called. The function will fill the registerData member with the contents of the desired register.
[in] dwSize The size of the struct pointed to by pI2CInfo
Note:
For Archer2 and Allegro2, use the same structures as Mesa.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetI2CRegister

DWORD JSGetKeyboardCustomMode ( DWORD *  pdwKeyboardMode  ) 

This function gets the specific custom keyboard mode that is currently active.

Parameters:
[out] *pdwKeyboardMode Returns one of the following:
          JS_SHIME_MODE_NONE
          JS_SHIME_MODE_FKEY
          JS_SHIME_MODE_FKEY_LOCK
Supported Platforms:
  • Allegro MX
See also:
JSSetKeyboardCustomMode

DWORD JSGetLEDStatus ( DWORD *  pdwLEDStatus  ) 

This function gets the status of the application LED(s). For the TK6000, the application LED is the LED on the right, and can be set to red, green, or amber in color. The LED on the left is the charge LED. For Mesa, the application LEDs are the blue and green LEDs on the navigation keyboard. The red LED is the charge LED and cannot be controlled by applications.

Parameters:
[out] pdwLEDStatus For each available LED, the corresponding bit will be set to 0 if it is OFF, and 1 if it is ON. Possible LED values are:
          LED_OFF
          LED_RED
          LED_GREEN
          LED_AMBER
          LED_BLUE
Note:
This is not supported on Archer. However, you can control the Green LED through Microsofts Notification LED API (such as using the NLED_SETTINGS_INFO structure and NLedSetDevice function).

For TK6000, the amber color is acheived by turning on the red and green LEDs simultaneously. For this reason LED_AMBER is defined as the combinations of LED_GREEN and LED_RED.

For Archer2 and Allegro2, see the LED_A2_* defines.

Example for Archer2 or Allegro2: To have the green LED under user control and turned on, both the LED_A2_GREEN_USER bit and the LED_A2_GREEN_ON bits must be set (LED_A2_GREEN_USER | LED_A2_GREEN_ON).

Supported Platforms:
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetLEDStatus

JSSetLEDStatusEx

DWORD JSGetPlatformName ( TCHAR *  szDeviceString,
DWORD *  pdwLen 
)

This function gets the platform name. It will be one of "Allegro MX", "TK6000", "Archer", "Mesa", "Archer2", or "Allegro2".

Parameters:
[out] szDeviceString The platform name is filled in here as a Unicode string.
[in,out] pdwLen As an input, this specifies the number of characters (not bytes) that szDeviceString points to. As an output, this states how many characters were used or how many are required.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2

DWORD JSGetPort ( DWORD  dwPortNumber,
DWORD *  pdwPortValue 
)

This function gets a value out of one of the eight memory mapped Expansion Ports. These Expansion Ports refer to the eight data lines, three address lines, and the chip select that are available through the expansion connector.

Parameters:
[in] dwPortNumber Set to which port (0-7) to retrieve the value for.
[out] pdwPortValue The value is filled out here. Range is 0 to 255.
Supported Platforms:
  • Allegro MX
See also:
JSSetPort

DWORD JSGetProcessorSpeed ( DWORD *  pdwProcSpeedCode  ) 

This function gets the processor speed (MHz).

Parameters:
[out] pdwProcSpeedCode Current processor speed filled in here. For Allegro MX, Archer, and TK6000, this can be any of the following values:
          PROC_SPEED_208
          PROC_SPEED_312
          PROC_SPEED_416
          PROC_SPEED_520

Allegro MX and TK6000 also have the following value:
          PROC_SPEED_624

Archer2 and Allegro2 have the following values:
          PROC_SPEED_AR2_760
          PROC_SPEED_AR2_1000
Note:
Archer2 and Allegro2 are always running at 1000 MHz unless the core gets very cold or very hot, in which case it drops down to 760 MHz. Setting the speed is not supported on Archer2 or Allegro2.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Archer2
  • Allegro2
See also:
JSSetProcessorSpeed

DWORD JSGetRadioInfo ( VOID *  pRadioInfo,
DWORD *  pdwSize 
)

This function gets information about which radios are present on the device. It does not retrieve information about radios connected as peripheral devices. (i.e. a GPS receiver connected over Bluetooth)

Parameters:
[out] pRadioInfo Cast a pointer to the JS_RADIO_INFO or JS_EXP_RADIO_INFO struct here for the radio information to be filled out in.
[in,out] pdwSize Size of the structure that you are using. This will get filled out with the size of the structure that is used or needed.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2

DWORD JSGetRingInPower ( DWORD *  pdwOn  ) 

This function gets the current ring-in power setting.

Parameters:
[out] pdwOn Current ring-in power setting is filled in here. 0 is off, 1 is on.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetRingInPower

DWORD JSGetSerialNumber ( TCHAR *  szSerialString,
DWORD *  pdwLen 
)

This function gets the serial number of the device.

Parameters:
[out] szSerialString The serial number is filled in here as a Unicode string.
[in,out] pdwLen As an input, this specifies the number of characters (not bytes) that szSerialString points to. As an output, this states how many characters were used or how many are required.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2

DWORD JSGetStickyKeyBrightness ( DWORD *  pdwKeyBright,
DWORD  dwPower 
)

This function gets the sticky key brightness on TK6000 and the keypad backlight brightness on Archer.

Parameters:
[out] pdwKeyBright This is filled out with the current keypad brightness. Range is from 0(off) to 255(full bright).
[in] dwPower Same as dwPower in JSGetBacklightBrightness.
Supported Platforms:
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetStickyKeyBrightness

DWORD JSGetTouchScreenState ( DWORD *  pdwEnable  ) 

This function gets the state of the touchscreen. A "TS" with a slash through it will show up in the title bar if the touchscreen is disabled.

Parameters:
[out] pdwEnable The state of the touchscreen is filled in here. 1 is enabled, 0 is disabled.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetTouchScreenState

DWORD JSGetWifiPower ( DWORD *  pdwState  ) 

This function gets the WiFi power state.

Parameters:
[out] pdwState The current power state of WiFi is filled in here. 0 is off and 1 is on.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSSetWifiPower

DWORD JSInitInterrupt ( DWORD  dwTrigger  ) 

This function initializes the interrupt line on the expansion board. Once this function has been called, a named event will be signaled every time the interrupt line gets triggered. The default name for this event is "EXP_IRQ_EVENT", but this can be changed by manipulating the registry value IntrEventName in [HKLM\Juniper\Expansion].

A default interrupt edge can be assigned in the registry. If it is present, then the IST is launched automatically during boot up.
[HKEY_LOCAL_MACHINE\Juniper\Expansion]
          "IntrEdge"=dword:40                     ; 0x40 = EXP_IRQ_EDGE_NONE, 0x10 = EXP_IRQ_EDGE_RISE, 0x20 = EXP_IRQ_DGE_FALL, 0x30 = EXP_IRQ_EDGE_BOTH

On Archer2 and Allegro2, the registry is setup as:
[HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_15]
          "IrqEdge"=dword:2                     ; 2 = Rising Edge, 3 = Falling Edge, 4 = Both edges, 5 = None (Default)

On Archer2 and Allegro2, the name must be setup in the registry on the previous boot before calling JSInitInterrupt. [HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_15]
          "IrqEventName"="your_event_name"

Parameters:
[in] dwTrigger Specifies which edge you want the interrupt to trigger on. Possible values are:
          EXP_IRQ_EDGE_RISE
          EXP_IRQ_EDGE_FALL
          EXP_IRQ_EDGE_BOTH
          EXP_IRQ_EDGE_NONE
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSStopInterrupt

DWORD JSSetBacklightBrightness ( DWORD  dwLCDBright,
DWORD  dwPower 
)

This function sets the backlight brightness.

Parameters:
[in] dwLCDBright New backlight brightness value. Range is from 0(off) to 255(full bright).
[in] dwPower Which power setting to set the brightness setting for. There are three options: battery power setting, external power setting, or whichever one the device is currently running off of. The defines used for these three are:
          POWER_CURRENT
          POWER_BATTERY
          POWER_EXTERNAL
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetBacklightBrightness

DWORD JSSetBacklightState ( DWORD  dwEnable  ) 

This function sets the state (whether it is enabled or not) of the backlight on battery power. It is assumed that if AC power is present, then the user would want the backlight on. There is not a similar state for AC power (except for a zero brightness value).

Parameters:
[in] dwEnable The state of the backlight for battery power will be set to this value. Set to 1 to enable and 0 to disable it.
Supported Platforms:
  • Allegro MX
  • TK6000
See also:
JSGetBacklightState

DWORD JSSetBluetoothOverrideState ( DWORD  dwEnable  ) 

This function sets the Bluetooth override state for suspend/resume power functionality. If Bluetooth is off when the unit is suspended, then the Bluetooth radio will stay powered off while it is suspended regardless of the override state. By default (override state not set), if Bluetooth is on when the radio is suspended, then the radio will stay powered and the stack will remain loaded during suspend. If the override state is set, and Bluetooth is on when the unit is suspended, then the radio will power down and the stack will unload during suspend and power up after being resumed.

Parameters:
[in] dwEnable The state of the Bluetooth override will be set to this value. Set to 1 to enable and 0 to disable.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
See also:
JSGetBluetoothOverrideState

DWORD JSSetCellModemPower ( DWORD  dwPowerState  ) 

Sets the power state of the cellular modem. If the device does not have a cellular modem, the function will return ERROR_DEV_NOT_EXIST.

Parameters:
[in] dwPowerState Specifies the new power state of the cellular modem. 1 will turn the modem ON. 0 will turn the modem OFF.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetCellModemPower

DWORD JSSetContrast ( DWORD  dwContrast  ) 

This function sets a new contrast value. This is only applicable for a monochrome screen. The higher the number, the more contrast (or darker) the screen is.

Parameters:
[in] dwContrast New contrast value. Range is from 0 to 254.
Supported Platforms:
  • Allegro MX monochrome
See also:
JSGetContrast

DWORD JSSetExp2GPIOWakeSource ( DWORD  dwEnable  ) 

This function either enables or disables(default) expansion GPIO 2 (bit 2 of the GPIOs) to be a wake source. The processor will wake if this pin is goes high during sleep.

Warning:
Externally driving this pin high when the processor enters it's sleep state can cause several wake sources not to work for the next resume. Therefore, care must be taken when using this API call to set the GPIO as a wake source. Please ensure that there is no exteral circuitry that will hold this pin high when the processor is entering it's sleep state.
Parameters:
[in] dwEnable Set to 1 to set expansion GPIO 2 as a wake source to the processor.
Note:
The direction of this pin must be set as an input.
Supported Platforms:
  • TK6000
See also:
JSGetExp2GPIOWakeSource
JSSetGPIODirection

DWORD JSSetExpansionPower ( DWORD  dwOn  ) 

This function checks to see if a module is present. If it is not then this call will fail with return code ERROR_DEV_NOT_EXIST. If a module is present, then this call will apply power to the power pin, then 40 ms later, the detect pin will be configured as an output and set high.

If you try to open an expansion COM port before setting the expansion power to on, then the COM port opening will fail. If you try and set expansion power to off while there are still expansion COM ports open, then this function will fail with error code ERROR_TOO_MANY_OPEN_FILES (4).

Parameters:
[in] dwOn Set to 1 to turn on, 0 to turn off.
Supported Platforms:
  • TK6000
See also:
JSGetExpansionPower

DWORD JSSetExpIRQState ( DWORD  dwExpIRQState  ) 

This function sets the configuration of the expansion header's interrupt line to be used as a wake-up source.

(Mesa): A default wake-up edge can be assigned in the registry.
[HKEY_LOCAL_MACHINE\Juniper\Expansion]
          "WakeEdge"=dword:40                     ; 0x40 = EXP_IRQ_EDGE_NONE, 0x10 = EXP_IRQ_EDGE_RISE, 0x20 = EXP_IRQ_EDGE_FALL, 0x30 = EXP_IRQ_EDGE_BOTH

Parameters:
[out] dwExpIRQState Set to one of the following values:
          EXP_IRQ_EDGE_RISE (Mesa)
          EXP_IRQ_EDGE_FALL (Mesa)
          EXP_IRQ_EDGE_BOTH (Mesa)
          EXP_IRQ_EDGE_NONE (Mesa)
          TRUE (Archer2 and Allegro2)
          FALSE (Archer2 and Allegro2)
Note:
On Archer2 and Allegro2, call JSInitInterrupt() before calling JSSetExpIRQState().
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetExpIRQState

DWORD JSSetGPIO ( DWORD  dwGPIOLevel,
DWORD  dwMask 
)

This function sets the level for the available expansion GPIOs. The level can either be high or low (default). If the pin is already an output, then it will start driving to the new level. If it is currently an input, then it will start driving to the level set here after it is set to an output. For Mesa, there are 17 GPIOS available in bits 0 through 16. For Allegro, there are nine GPIOs available in bits 0 through 8. For TK6000, there are three GPIOs available in bits 0 through 2. For Archer2 and Allegro2, there are 16 GPIOs available in bits 0 through 15. The level can be set anytime.

These GPIOs on Mesa, Archer2, and Allegro2 can be assigned a default level in the registry.
[HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_xx]           where xx = 00 thru 16(15 on Archer2 and Allegro2)
          "Level"=dword:0                     ; 0 = low, 1 = high

Parameters:
[in] dwGPIOLevel Set the corresponding GPIO bit to 0 for low and 1 for high.
[in] dwMask This is used to specify which GPIOs(bits) you want changed. This prevents you from having to "Get" the direction first if you know you only want GPIOs 0 and 6 to be set with this function then only set bits 0 and 6 in the mask(0x00000041).
Note:
You should call this function before calling JSSetGPIODirection to ensure that the GPIO starts driving to the correct state as it changes to an output.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetGPIODirection
JSSetGPIODirection
JSGetGPIO

DWORD JSSetGPIOAltState ( DWORD  dwGPIOAltState,
DWORD  dwMask 
)

This function sets the GPIO pins on the expansion header to operate in either normal GPIO mode or their alternate function mode.

These GPIOs on Mesa can be assigned to be alternate function in the registry.
[HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_xx]           where xx = 00 thru 16
          "AltFunc"=dword:0                     ; 0 = GPIO, 1 = alt function

These GPIOs on Archer2 and Allegro2 can be assigned different "Functions" in the registry.
[HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_xx]           where xx = 00 thru 15
          "Function"=dword:0                     ; 0 = GPIO, 1 = hardware function.
See the associated registry file for more information and other functions. The other functions can be access programmatically using direct IOCTLs to the Expansion Driver. GPIO 11, 12, and 15 do not have function=1 (you may only set function 0 through JSAPI).

Parameters:
[in] dwGPIOAltState Set the corresponding GPIO bit to 0 for normal GPIO mode and 1 for alternate function mode.
[in] dwMask This is used to specify which GPIOs(bits) you want changed. This prevents you from having to "Get" the current mode first if you know you only want GPIOs 0 and 6 to be set with this function then only set bits 0 and 6 in the mask(0x00000041). For Mesa, the following pre-defined masks may be used to set the mode for a group of pins:
          MESA_COM1_MASK
          MESA_SPI_MASK
          MESA_COM3_MASK
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetGPIOAltState

DWORD JSSetGPIODirection ( DWORD  dwGPIODirection,
DWORD  dwMask 
)

This function sets the direction for the available expansion GPIOs. The direction can either be an input (default) or an output. For Mesa, there are 17 GPIOS available in bits 0 through 16. For Allegro, there are nine GPIOs available in bits 0 through 8. For TK6000, there are three GPIOs available in bits 0 through 2. For Archer2 and Allegro2, there are 16 GPIOs available in bits 0 through 15.

These GPIOs on Mesa, Archer2, and Allegro2 can be assigned a default direction in the registry.
[HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_xx]           where xx = 00 thru 16(15 on Archer2 and Allegro2)
          "Direction"=dword:0                     ; 0 = input, 1 = output

Warning:
There is the potential for a drive-fight if an expansion module is driving onto an expansion pin and an API is called to set that pin to an output.
Parameters:
[in] dwGPIODirection Set the corresponding GPIO bit to 0 for input and 1 for output.
[in] dwMask This is used to specify which GPIOs(bits) you want changed. This prevents you from having to "Get" the direction first if you know you only want GPIOs 0 and 6 to be set with this function then only set bits 0 and 6 in the mask(0x00000041).
Note:
You should call JSSetGPIO before calling this function to ensure that the GPIO starts driving to the correct state as it changes to an output.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetGPIODirection
JSGetGPIO
JSSetGPIO

DWORD JSSetGPIOPull ( DWORD  dwGPIO,
DWORD  dwPullDirection 
)

This function sets the pull direction of a GPIO pin on the expansion header

These GPIOs on Mesa can be assigned a default pull in the registry.
[HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_xx]           where xx = 00 thru 16
          "Pull"=dword:A000                    ; 0xA000 = GPIO_PULL_DOWN, 0xC000 = GPIO_PULL_UP, 0x8000 = GPIO_PULL_NEITHER

For Archer2 and Allegro2, see the associated regsitry file for registry options.

Parameters:
[in] dwGPIO Set the corresponding GPIO bit that you wish to set the pull direction for. You can only set the pull direction for one pin at a time.
[in] dwPullDirection The new pull direction for the specified pin. Set to one of the following values:
          GPIO_PULL_NEITHER (Mesa)
          GPIO_PULL_DOWN (Mesa)
          GPIO_PULL_UP (Mesa)
          EXP_PULL_NONE (Archer2 and Allegro2)
          EXP_PULL_KEEPER (Archer2 and Allegro2)
          EXP_PULL_DOWN_360K (Archer2 and Allegro2)
          EXP_PULL_UP_100K (Archer2 and Allegro2)
          EXP_PULL_UP_75K (Archer2 and Allegro2)
          EXP_PULL_UP_22K (Archer2 and Allegro2)
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetGPIOPull

DWORD JSSetGPIOSuspend ( DWORD  dwGPIO,
DWORD  dwSuspendState 
)

This function sets the suspend behavior of a GPIO pin on the expansion header

These GPIOs on Mesa can be assigned a default suspend behavior in the registry.
[HKEY_LOCAL_MACHINE\Juniper\Expansion\GPIO_xx]           where xx = 00 thru 16
          "Suspend"=dword:380                    ; 0x380 = GPIO_SUSPEND_KEEPER, 0x280 = GPIO_SUSPEND_INPUT, 0x200 = GPIO_SUSPEND_OUTPUT_LO, 0x300 = GPIO_SUSPEND_OUTPUT_HI

Parameters:
[in] dwGPIO Set the corresponding GPIO bit that you wish to change the suspend behavior for. You can only set the suspend behavior for one pin at a time.
[in] dwSuspendState The new suspend behavior for the specified pin. Set to one of the following values:
          GPIO_SUSPEND_INPUT (Mesa)
          GPIO_SUSPEND_OUTPUT_LO (Mesa)
          GPIO_SUSPEND_OUTPUT_HI (Mesa)
          GPIO_SUSPEND_KEEPER (Mesa)
          EXP_SUSPEND_STATE_KEEPER (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_OUT_LOW (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_OUT_HIGH (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_PNONE (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_PKEEP (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_360K_PD (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_75K_PU (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_100K_PU (Archer2 and Allegro2)
          EXP_SUSPEND_STATE_IN_22K_PU (Archer2 and Allegro2)
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetGPIOSuspend

DWORD JSSetI2CRegister ( VOID *  pI2CInfo,
DWORD  dwSize 
)

This functions sets the contents of an I2C Register

Parameters:
[in] pI2CInfo Pointer to one of the following data types:
          MESA_I2C_INFO
          MESA_SCCB_INFO
The struct must be filled out completely before this function is called.
[in] dwSize The size of the struct pointed to by pI2CInfo
Note:
For Archer2 and Allegro2, use the same structures as Mesa.
Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetI2CRegister

DWORD JSSetKeyboardCustomMode ( DWORD  dwKeyboardMode  ) 

This function sets the specific custom keyboard mode that will be activated later by a call to SHSetImeMode with the window handle and the mode set to SHIME_MODE_CUSTOM. See Windows Mobile 6 SDK documentation for more information about SHSetImeMode.

Parameters:
[in] dwKeyboardMode Set it to one of the following:
          JS_SHIME_MODE_FKEY
          JS_SHIME_MODE_FKEY_LOCK
          0 (for none)
Supported Platforms:
  • Allegro MX
See also:
JSGetKeyboardCustomMode

DWORD JSSetLEDStatus ( DWORD  dwLEDStatus  ) 

This function sets the status of the application LED(s). For the TK6000, the application LED is the LED on the right, and can be set to red, green, or amber in color. The one on the left is the charge LED. For Mesa, the application LEDs are the blue and green LEDs on the navigation keyboard. The red LED is the charge LED and cannot be controlled by applications.

Parameters:
[in] dwLEDStatus For each available LED, set the corresponding bit to 0 to turn it OFF, and 1 to turn it ON. Possible LED values are:
          LED_OFF
          LED_RED
          LED_GREEN
          LED_AMBER
          LED_BLUE
Note:
This is not supported on Archer. However, you can control the Green LED through Microsofts Notification LED API (such as using the NLED_SETTINGS_INFO structure and NLedSetDevice function).

For TK6000, the amber color is acheived by turning on the red and green LEDs simultaneously. For this reason LED_AMBER is defined as the combinations of LED_GREEN and LED_RED.

For Archer2 and Allegro2, see the LED_A2_* defines

Supported Platforms:
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetLEDStatus

JSSetLEDStatusEx

DWORD JSSetLEDStatusEx ( DWORD  dwLEDStatus,
DWORD  dwMask 
)

This function sets the status of the application LED(s). For the TK6000, the application LED is the LED on the right, and can be set to red, green, or amber in color. The one on the left is the charge LED. For Mesa, the application LEDs are the blue and green LEDs on the navigation keyboard. The red LED is the charge LED and cannot be controlled by applications.

Parameters:
[in] dwLEDStatus For each available LED, set the corresponding bit to 0 to turn it OFF, and 1 to turn it ON. Possible LED values are:
          LED_OFF
          LED_RED
          LED_GREEN
          LED_AMBER
          LED_BLUE
[in] dwMask This is used to specify which LEDs(bits) you want changed. This prevents you from having to "Get" the status of the LEDs first. If you know you only want LED_GREEN to be changed with this function then only set the LED_GREEN bit in the mask(0x00000002).
Note:
This is not supported on Archer. However, you can control the Green LED through Microsofts Notification LED API (such as using the NLED_SETTINGS_INFO structure and NLedSetDevice function).

For TK6000, the amber color is acheived by turning on the red and green LEDs simultaneously. For this reason LED_AMBER is defined as the combinations of LED_GREEN and LED_RED.

Supported Platforms:
  • Mesa
See also:
JSGetLEDStatus

JSSetLEDStatus

DWORD JSSetPort ( DWORD  dwPortNumber,
DWORD  dwPortValue 
)

This function sets a value in one of the eight memory mapped Expansion Ports. These Expansion Ports refer to the eight data lines, three address lines, and the chip select that are available through the expansion connector.

Parameters:
[in] dwPortNumber Set to which port (0-7) to set the value for.
[in] dwPortValue The new value to use. Range is 0 to 255.
Supported Platforms:
  • Allegro MX
See also:
JSGetPort

DWORD JSSetPower ( DWORD  dwPowerCode  ) 

This function can suspend, reset, or power off the device.

Parameters:
[in] dwPowerCode Set to one of the following:
          PWR_SUSPEND
          PWR_RESET
          PWR_POWER_OFF
          PWR_CLEAN_BOOT_ROOT
          PWR_CLEAN_BOOT_STORAGE
          PWR_CLEAN_BOOT_REGISTRY
          PWR_CLEAN_BOOT_ALL
Note:
The PWR_CLEAN_BOOT_xx options all reset the device. Upon the next boot, the clean will have taken effect. None of these options are Available on TK6000 or Allegro MX.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2

DWORD JSSetProcessorSpeed ( DWORD  dwProcSpeedCode  ) 

This function sets the processor speed (MHz).

Parameters:
[in] dwProcSpeedCode New processor speed. For Allegro MX, Archer, and TK6000, this can be any of the following values:
          PROC_SPEED_208
          PROC_SPEED_312
          PROC_SPEED_416
          PROC_SPEED_520

Allegro MX and TK6000 also accept the following value:
          PROC_SPEED_624
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
See also:
JSGetProcessorSpeed

DWORD JSSetRingInPower ( DWORD  dwOn  ) 

This function can set the ring-in pin on COM1 to be a power pin. If not set (default), then the ring-in pin behaves like a normal ring-in pin would. By setting this, +5V will be applied to the ring-in pin on COM1.

Warning:
Do NOT set this if there is a potential for a drive fight with hardware connected to COM1.
Parameters:
[in] dwOn Set to 1 to turn on, 0 to turn off.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetRingInPower

DWORD JSSetStickyKeyBrightness ( DWORD  dwKeyBright,
DWORD  dwPower 
)

This function sets the sticky key brightness on TK6000 and the keypad backlight brightness on Archer.

Parameters:
[in] dwKeyBright New sticky key brightness value. Range is from 0(off) to 255(full bright).
[in] dwPower Same as dwPower in JSGetBacklightBrightness.
Supported Platforms:
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetStickyKeyBrightness

DWORD JSSetTouchScreenState ( DWORD  dwEnable  ) 

This function sets the state of the touchscreen. A "TS" with a slash through it will show up in the title bar if the touchscreen is disabled.

Parameters:
[in] dwEnable Set to 1 to enable the touchscreen, 0 to disable.
Supported Platforms:
  • Allegro MX
  • Archer
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetTouchScreenState

DWORD JSSetWifiPower ( DWORD  dwState  ) 

This function sets the WiFi power state.

Parameters:
[in] dwState Set this to 0 to turn WiFi power off or 1 to turn it on.
Supported Platforms:
  • Allegro MX
  • TK6000
  • Mesa
  • Archer2
  • Allegro2
See also:
JSGetWifiPower

DWORD JSStopInterrupt (  ) 

This function causes the system to stop watching for interrupts on the expansion header's interrupt line.

Supported Platforms:
  • Mesa
  • Archer2
  • Allegro2
See also:
JSInitInterrupt


Generated on Thu Oct 31 10:16:52 2019 by  doxygen 1.5.5