00001
00040 #pragma once
00041 #include <windows.h>
00042
00043
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047
00068 #define GPS_EVENT_DEFAULT_NAME L"JS_GPS_1HZ_SIGNAL"
00069
00086 #define DOCK_EVENT_NAME L"JS_DOCK_EVENT"
00087
00102 DWORD JSGetAmbientTemp(DWORD * pdwTemp);
00103
00104
00134 typedef struct
00135 {
00136 WORD Battery1_TotalCapacity;
00137 WORD Battery2_TotalCapacity;
00138
00139 WORD Battery1_Voltage;
00140 WORD Battery2_Voltage;
00141
00142 INT16 Battery1_Current;
00143 INT16 Battery2_Current;
00144
00145 WORD Battery_Interval;
00146
00147 INT16 Battery1_Temperature;
00148 INT16 Battery2_Temperature;
00149
00150 BYTE Battery1_Percentage;
00151 BYTE Battery2_Percentage;
00152
00153 BYTE Battery_Flags;
00154
00155
00156
00157 BYTE Reserved;
00158 } TK6000_BATTERY_INFO;
00159
00160
00161 #define BATTERY_1_PRESENT 0x08
00162 #define BATTERY_1_CHARGING 0x04
00163 #define BATTERY_2_PRESENT 0x02
00164 #define BATTERY_2_CHARGING 0x01
00165
00166
00200 typedef struct
00201 {
00202
00203 WORD Battery1_Percentage;
00204 WORD Battery2_Percentage;
00205
00206
00207 WORD Battery1_Voltage;
00208 WORD Battery2_Voltage;
00209
00210
00211
00212 INT16 Battery1_Current;
00213 INT16 Battery2_Current;
00214
00215
00216 INT16 Battery1_Temperature;
00217 INT16 Battery2_Temperature;
00218
00219
00220 WORD Battery1_TimeToFull;
00221 WORD Battery2_TimeToFull;
00222
00223
00224 WORD Battery1_TimeToEmpty;
00225 WORD Battery2_TimeToEmpty;
00226
00227
00228 DWORD Battery_Flags;
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248 } MESA_BATTERY_INFO;
00249
00250
00251 #define MESA_STATUS_EXT_POWER_PRESENT 0x00000100
00252 #define MESA_STATUS_BAT1_PRESENT 0x00000200
00253 #define MESA_STATUS_BAT2_PRESENT 0x00000400
00254 #define MESA_STATUS_EXT_POWER_CONNECTED 0x00000800
00255 #define MESA_STATUS_BAT1_CONNECTED 0x00001000
00256 #define MESA_STATUS_BAT2_CONNECTED 0x00002000
00257 #define MESA_STATUS_BAT1_CHARGING 0x00004000
00258 #define MESA_STATUS_BAT2_CHARGING 0x00008000
00259 #define MESA_STATUS_BAT1_BQ_OK 0x00100000
00260 #define MESA_STATUS_BAT2_BQ_OK 0x00200000
00261 #define MESA_STATUS_BAT1_OK_TO_CHARGE 0x02000000
00262 #define MESA_STATUS_BAT2_OK_TO_CHARGE 0x04000000
00263 #define MESA_STATUS_BAT1_CHARGE_ERROR 0x08000000
00264 #define MESA_STATUS_BAT2_CHARGE_ERROR 0x10000000
00265
00266
00267
00297 typedef struct
00298 {
00299 WORD Battery_Voltage;
00300 INT16 Battery_Current;
00301
00302 WORD Battery_Interval;
00303 INT16 Battery_Temperature;
00304 WORD Battery_Capacity;
00305 BYTE Battery_Percentage;
00306 BYTE Battery_Flags;
00307
00308
00309 } ALLEGRO_BATTERY_INFO;
00310
00311
00312 #define BATTERY_CHARGEKNOWN 0x10 // This is set if the charge percentage is
00313
00314 #define BATTERY_PRESENT 0x08
00315 #define BATTERY_CHARGING 0x04
00316 #define BATTERY_ALKALINE 0x02 // This is set if an alkaline battery is installed
00317 #define BATTERY_VEHICLEMODE 0x01 // This is set if in vehicle charge mode
00318
00319
00333 #define ARCHER_BATTERY_INFO ALLEGRO_BATTERY_INFO
00334
00356 DWORD JSGetBatteryStatus(VOID * pBattInfo, DWORD * pdwSize);
00357
00358
00373 DWORD JSGetDisplayType(DWORD * pdwDispType);
00374
00375
00394 DWORD JSGetPlatformName(TCHAR * szDeviceString, DWORD * pdwLen);
00395
00396
00397 #define BLUETOOTH_NOT_PRESENT 0
00398 #define BLUETOOTH_921600 1
00399 #define BLUETOOTH_115200 2
00400
00415 typedef struct
00416 {
00417 DWORD dwBluetoothHardware;
00418 DWORD dwWiFiHardware;
00419 } JS_RADIO_INFO;
00420
00437 typedef struct
00438 {
00439 DWORD dwBluetoothHardware;
00440 DWORD dwWiFiHardware;
00441 DWORD dwCellHardware;
00442 DWORD dwGPSHardware;
00443 } JS_EXP_RADIO_INFO;
00444
00463 DWORD JSGetRadioInfo(VOID * pRadioInfo, DWORD * pdwSize);
00464
00465
00483 DWORD JSGetSerialNumber(TCHAR * szSerialString, DWORD * pdwLen);
00484
00485
00486 #define PWR_SUSPEND 1
00487 #define PWR_RESET 2
00488 #define PWR_POWER_OFF 3
00489 #define PWR_CLEAN_BOOT_ROOT 4
00490 #define PWR_CLEAN_BOOT_STORAGE 5
00491 #define PWR_CLEAN_BOOT_REGISTRY 6
00492 #define PWR_CLEAN_BOOT_ALL 7
00493
00516 DWORD JSSetPower(DWORD dwPowerCode);
00517
00518 #define POWER_CURRENT 0
00519 #define POWER_BATTERY 1
00520 #define POWER_EXTERNAL 2
00521
00544 DWORD JSGetBacklightBrightness(DWORD * pdwLCDBright, DWORD dwPower);
00545
00546
00569 DWORD JSSetBacklightBrightness(DWORD dwLCDBright, DWORD dwPower);
00570
00571
00588 DWORD JSGetBacklightState(DWORD * pdwEnable);
00589
00590
00607 DWORD JSSetBacklightState(DWORD dwEnable);
00608
00609
00634 DWORD JSGetBluetoothOverrideState(DWORD * pdwEnable);
00635
00636
00661 DWORD JSSetBluetoothOverrideState(DWORD dwEnable);
00662
00663
00677 DWORD JSGetContrast(DWORD * pdwContrast);
00678
00679
00692 DWORD JSSetContrast(DWORD dwContrast);
00693
00694
00706 DWORD JSGetExpansionPower(DWORD * pdwOn);
00707
00708
00727 DWORD JSSetExpansionPower(DWORD dwOn);
00728
00729
00743 DWORD JSGetExp2GPIOWakeSource(DWORD * pdwEnable);
00744
00745
00769 DWORD JSSetExp2GPIOWakeSource(DWORD dwEnable);
00770
00771 #define MESA_EXP_GPIO_0 0x00000001 //41 (1:9)
00772 #define MESA_EXP_GPIO_1 0x00000002 //42 (1:10)
00773 #define MESA_EXP_GPIO_2 0x00000004 //43 (1:11)
00774 #define MESA_EXP_GPIO_3 0x00000008 //44 (1:12)
00775 #define MESA_EXP_GPIO_4 0x00000010 //45 (1:13)
00776 #define MESA_EXP_GPIO_5 0x00000020 //46 (1:14)
00777 #define MESA_EXP_GPIO_6 0x00000040 //47 (1:15)
00778 #define MESA_EXP_GPIO_7 0x00000080 //48 (1:16)
00779 #define MESA_EXP_GPIO_8 0x00000100 //87 (2:23)
00780 #define MESA_EXP_GPIO_9 0x00000200 //89 (2:25)
00781 #define MESA_EXP_GPIO_10 0x00000400 //90 (2:26)
00782 #define MESA_EXP_GPIO_11 0x00000800 //91 (2:27)
00783 #define MESA_EXP_GPIO_12 0x00001000 //92 (2:28)
00784 #define MESA_EXP_GPIO_13 0x00002000 //109 (3:13)
00785 #define MESA_EXP_GPIO_14 0x00004000 //110 (3:14)
00786 #define MESA_EXP_GPIO_15 0x00008000 //111 (3:15)
00787 #define MESA_EXP_GPIO_16 0x00010000 //112 (3:16)
00788
00789 #define MESA_COM1_RXD MESA_EXP_GPIO_0 //41 (1:9)
00790 #define MESA_COM1_TXD MESA_EXP_GPIO_1 //42 (1:10)
00791 #define MESA_COM1_CTS MESA_EXP_GPIO_2 //43 (1:11)
00792 #define MESA_COM1_DCD MESA_EXP_GPIO_3 //44 (1:12)
00793 #define MESA_COM1_DSR MESA_EXP_GPIO_4 //45 (1:13)
00794 #define MESA_COM1_RI MESA_EXP_GPIO_5 //46 (1:14)
00795 #define MESA_COM1_DTR MESA_EXP_GPIO_6 //47 (1:15)
00796 #define MESA_COM1_RTS MESA_EXP_GPIO_7 //48 (1:16)
00797 #define MESA_GPIO_FLASH MESA_EXP_GPIO_8 //87 (2:23)
00798 #define MESA_SPI_CLK MESA_EXP_GPIO_9 //89 (2:25)
00799 #define MESA_SPI_CSB MESA_EXP_GPIO_10 //90 (2:26)
00800 #define MESA_SPI_MOSI MESA_EXP_GPIO_11 //91 (2:27)
00801 #define MESA_SPI_MISO MESA_EXP_GPIO_12 //92 (2:28)
00802 #define MESA_COM3_RTS MESA_EXP_GPIO_13 //109 (3:13)
00803 #define MESA_COM3_RXD MESA_EXP_GPIO_14 //110 (3:14)
00804 #define MESA_COM3_TXD MESA_EXP_GPIO_15 //111 (3:15)
00805 #define MESA_COM3_CTS MESA_EXP_GPIO_16 //112 (3:16)
00806
00807 #define MESA_COM1_MASK 0x000000FF
00808 #define MESA_SPI_MASK 0x00001E00
00809 #define MESA_COM3_MASK 0x0001E000
00810 #define MESA_GPIO_MASK 0x0001FFFF
00811
00812 #define MESA_NUM_GPIO 17
00813
00814 #define GPIO_PULL_DEFAULT 0x0000
00815 #define GPIO_PULL_NEITHER 0x8000
00816 #define GPIO_PULL_DOWN 0xA000
00817 #define GPIO_PULL_UP 0xC000
00818 #define GPIO_PULL_MASK 0xE000
00819
00820 #define GPIO_SUSPEND_INPUT 0x280
00821 #define GPIO_SUSPEND_OUTPUT_LO 0x200
00822 #define GPIO_SUSPEND_OUTPUT_HI 0x300
00823 #define GPIO_SUSPEND_KEEPER 0x380
00824 #define GPIO_SUSPEND_MASK 0x380
00825
00826 #define EXP_IRQ_EDGE_RISE 0x0010
00827 #define EXP_IRQ_EDGE_FALL 0x0020
00828 #define EXP_IRQ_EDGE_BOTH 0x0030
00829 #define EXP_IRQ_EDGE_NONE 0x0040
00830 #define EXP_IRQ_EDGE_MASK 0x0070
00831
00832
00851 DWORD JSGetGPIO(DWORD * pdwGPIOLevel);
00852
00853
00889 DWORD JSSetGPIO(DWORD dwGPIOLevel, DWORD dwMask);
00890
00891
00910 DWORD JSGetGPIODirection(DWORD * pdwGPIODirection);
00911
00912
00950 DWORD JSSetGPIODirection(DWORD dwGPIODirection, DWORD dwMask);
00951
00952
00953 #define VK_OEM_F1 0xE9
00954 #define VK_OEM_F2 0xEA
00955 #define VK_OEM_F3 0xEB
00956 #define VK_OEM_F4 0xEC
00957 #define VK_OEM_F5 0xED
00958 #define VK_OEM_F6 0xEE
00959 #define VK_OEM_F7 0xEF
00960 #define VK_OEM_F8 0xF0
00961 #define VK_OEM_F9 0xF1
00962 #define VK_OEM_F10 0xF2
00963 #define VK_OEM_F11 0xF3
00964 #define VK_OEM_F12 0xF4
00965 #define JS_SHIME_MODE_NONE 0
00966 #define JS_SHIME_MODE_FKEY 1
00967 #define JS_SHIME_MODE_FKEY_LOCK 2
00968
00982 DWORD JSGetKeyboardCustomMode( DWORD *pdwKeyboardMode );
00983
00984
01001 DWORD JSSetKeyboardCustomMode( DWORD dwKeyboardMode );
01002
01003
01004 #define LED_OFF 0x00
01005 #define LED_RED 0x01
01006 #define LED_GREEN 0x02
01007 #define LED_AMBER 0x03
01008 #define LED_BLUE 0x04
01009 #define LED_MESA_MASK 0x06
01010
01042 DWORD JSGetLEDStatus(DWORD * pdwLEDStatus);
01043
01044
01076 DWORD JSSetLEDStatus(DWORD dwLEDStatus);
01077
01114 DWORD JSSetLEDStatusEx(DWORD dwLEDStatus, DWORD dwMask);
01115
01116
01131 DWORD JSGetPort(DWORD dwPortNumber, DWORD * pdwPortValue);
01132
01133
01148 DWORD JSSetPort(DWORD dwPortNumber, DWORD dwPortValue);
01149
01150
01151
01152
01153 #define PROC_SPEED_208 2
01154 #define PROC_SPEED_312 3
01155 #define PROC_SPEED_416 4
01156 #define PROC_SPEED_520 5
01157 #define PROC_SPEED_624 6
01158 #define PROC_SPEED_PERFORMANCE 97
01159 #define PROC_SPEED_POWER_SAVE 98
01160 #define PROC_SPEED_AUTO 99
01161
01184 DWORD JSGetProcessorSpeed(DWORD * pdwProcSpeedCode);
01185
01186
01208 DWORD JSSetProcessorSpeed(DWORD dwProcSpeedCode);
01209
01210 #define GPIO_BIT_RI_POWER 0x40000000
01211
01225 DWORD JSGetRingInPower(DWORD * pdwOn);
01226
01227
01245 DWORD JSSetRingInPower(DWORD dwOn);
01246
01247
01264 DWORD JSGetStickyKeyBrightness(DWORD * pdwKeyBright, DWORD dwPower);
01265
01266
01282 DWORD JSSetStickyKeyBrightness(DWORD dwKeyBright, DWORD dwPower);
01283
01284
01301 DWORD JSGetTouchScreenState(DWORD * pdwEnable);
01302
01303
01320 DWORD JSSetTouchScreenState(DWORD dwEnable);
01321
01322
01336 DWORD JSGetWifiPower(DWORD * pdwState);
01337
01338
01352 DWORD JSSetWifiPower(DWORD dwState);
01353
01354
01355
01356 #define VOLUME_MDOC_USER 1
01357
01372 DWORD JSFormatVolume(DWORD dwVolumeId);
01373
01387 typedef struct
01388 {
01389 BYTE slaveAddress;
01390 BYTE registerAddress;
01391 BYTE registerData;
01392 } MESA_I2C_INFO;
01393
01394 typedef struct
01395 {
01396 BYTE slaveAddress;
01397 WORD registerAddress;
01398 BYTE registerData;
01399 } MESA_SCCB_INFO;
01400
01419 DWORD JSGetI2CRegister(VOID * pI2CInfo, DWORD dwSize);
01420
01436 DWORD JSSetI2CRegister(VOID * pI2CInfo, DWORD dwSize);
01437
01452 DWORD JSGetGPIOAltState(DWORD * pdwGPIOAltState);
01453
01480 DWORD JSSetGPIOAltState(DWORD dwGPIOAltState, DWORD dwMask);
01481
01500 DWORD JSGetGPIOPull(DWORD dwGPIO, DWORD * pdwGPIOPullDirection);
01501
01523 DWORD JSSetGPIOPull(DWORD dwGPIO, DWORD dwPullDirection);
01524
01543 DWORD JSGetGPIOSuspend(DWORD dwGPIO, DWORD * pdwSuspendState);
01544
01567 DWORD JSSetGPIOSuspend(DWORD dwGPIO, DWORD dwSuspendState);
01568
01586 DWORD JSGetExpIRQState(DWORD * pdwExpIRQState);
01587
01607 DWORD JSSetExpIRQState(DWORD dwExpIRQState);
01608
01609
01636 typedef struct
01637 {
01638 DWORD dwModulesPresent;
01639 TCHAR wszModelNumber[8];
01640 DWORD dwRamSize;
01641 DWORD dwStorageSize;
01642 WCHAR wszBoardRevision[16];
01643 WCHAR wszPICVersion[64];
01644 WCHAR wszBootloaderVersion[8];
01645 WCHAR wszOSVersion[64];
01646 WCHAR wszOSBuildNumber[64];
01647 DWORD dwLanguageCode;
01648 } MESA_DEVICE_INFO;
01649
01650 #define MODULES_PRESENT_BLUETOOTH 0x00000001
01651 #define MODULES_PRESENT_WIFI 0x00000002
01652 #define MODULES_PRESENT_GPS 0x00000004
01653 #define MODULES_PRESENT_CAMERA 0x00000008
01654 #define MODULES_PRESENT_CELLULAR 0x00000010
01655
01669 DWORD JSGetDeviceInfo(VOID * pDeviceInfo, DWORD * pdwSize);
01670
01671 #define IRQ_EVENT_DEFAULT_NAME L"EXP_IRQ_EVENT"
01672
01697 DWORD JSInitInterrupt(DWORD dwTrigger);
01698
01708 DWORD JSStopInterrupt();
01709
01723 DWORD JSGetCellModemPower(DWORD * pdwPowerState);
01724
01738 DWORD JSSetCellModemPower(DWORD dwPowerState);
01739
01749 DWORD JSGetDockStatus(BOOL * pfDocked);
01750
01751
01752 #ifdef __cplusplus
01753 }
01754 #endif