0% found this document useful (0 votes)
35 views

Confidential. All Rights Reserved

The document describes a software development kit that allows control of LED lighting on Cooler Master peripheral devices. It includes sample code and descriptions, SDK directory contents like an LED table and function documentation. It also provides definitions for structs and enums for LED matrix sizes and effects. Functions are described that can retrieve system info, set the controlled device, check device status, get the layout, and control the LEDs. Requirements include supported Windows versions and devices.

Uploaded by

Jackie Wei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Confidential. All Rights Reserved

The document describes a software development kit that allows control of LED lighting on Cooler Master peripheral devices. It includes sample code and descriptions, SDK directory contents like an LED table and function documentation. It also provides definitions for structs and enums for LED matrix sizes and effects. Functions are described that can retrieve system info, set the controlled device, check device status, get the layout, and control the LEDs. Requirements include supported Windows versions and devices.

Uploaded by

Jackie Wei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Contents

Overview ...............................................................................................................................................................3

SDK Package ..........................................................................................................................................................4

1. Sample execution file .........................................................................................................................................4

2. Sample source code; ..........................................................................................................................................4

3. Sample description ............................................................................................................................................4

(II) SDK directory content .......................................................................................................................................4

1. CoolerMaster LED Table.xls: LED Matrix (6 row x 22 Column) ..............................................................................4

2. SDK Function.doc: function instructions provided ...............................................................................................4

3. x86 directory: dynamic link libraries, Lib file and header file................................................................................4

Requirements ........................................................................................................................................................5

Supported Devices .............................................................................................................................................5

Keyboards .........................................................................................................................................................5

Mouse ...............................................................................................................................................................5

Reference ..............................................................................................................................................................6

SDK Related Definitions .....................................................................................................................................6

LED Matrix SIZE ..............................................................................................................................................6

struct KEY_COLOR { ........................................................................................................................................6

struct COLOR_MATRIX {..................................................................................................................................7

enum EFF_INDEX { ..........................................................................................................................................7

System data related function .............................................................................................................................8

TCHAR * GetNowTime() ..................................................................................................................................8

LONG GetNowCPUUsage() .......................................................................................................................8

Confidential. All rights reserved.


DWORD GetRamUsage() .............................................................................................................................9

float GetNowVolumePeekValue() ..............................................................................................................9

Device operation function ................................................................................................................................ 10

Void SetControlDevice(DEVICE_INDEX devIndex) ..................................................................................... 10

bool IsDevicePlug() .................................................................................................................................. 10

LAYOUT_KEYOBARD GetDeviceLayout() ........................................................................................................ 11

bool EnableLedControl(bool bEnable) ........................................................................................................... 11

bool SwitchLedEffect(EFF_INDEX iEffectIndex) .............................................................................................. 12

bool SetFullLedColor(BYTE r, BYTE g, BYTE b ) ................................................................................................ 12

bool SetAllLedColor(COLOR_MATRIX colorMatrix ) ....................................................................................... 13

bool SetLedColor(int iRow, int iColumn, BYTE r, BYTE g, BYTE b ) ................................................................... 13

SDK example ....................................................................................................................................................... 14

Confidential. All rights reserved.


Overview
The Cooler Master Maker Toolbox is a software development kit that gives you complete
access to the code behind LED lighting on all of our peripheral products. With the controls in
your hands and the ability to retrieve system data from your PC, your lighting can be
programmed to change, for example, according to the music you play or the speed of your
processor. Create a whole host of effects using basic C++ knowledge.

Share your profiles with other Cooler Master peripheral owners at


http://makerhub.coolermaster.com

Confidential. All rights reserved.


SDK Package
Example Folder:
(I) Example directory content

1. Sample execution file

2. Sample source code;

3. Sample description

(II) SDK directory content

1. CoolerMaster LED Table.xls: LED Matrix (6 row x 22 Column)

2. SDK Function.doc: function instructions provided

3. x86 directory: dynamic link libraries, Lib file and header file

Confidential. All rights reserved.


Requirements
Windows 7 (32-bit and 64-bit);
Windows 8.1 (32-bit and 64-bit);
Windows 10 (32-bit and 64-bit).

Supported Devices

Keyboards
MasterKeys Pro L with RGB (SGK-6020)
MasterKeys Pro S with RGB (SGK-6030)
MasterKeys Pro L with White (SGK-4070)
MasterKeys Pro M with White (SGK-4080)

Mouse
MasterMouse Pro L (SGM-4006-KFOA1)

Confidential. All rights reserved.


Reference

SDK Related Definitions

LED Matrix SIZE


MAX_LED_RO:6
MAX_LED_COLUMN:22

struct KEY_COLOR {
BYTE r;
BYTE g;
BYTE b;
};

Confidential. All rights reserved.


struct COLOR_MATRIX {
Description: set/store entire LED Color structure
KEY_COLOR KeyColor[MAX_LED_ROW][MAX_LED_COLUMN];
};

enum EFF_INDEX {
Description: set/store entire LED Color structure Special effects list
EFF_FULL_ON = 0, EFF_BREATH = 1,
EFF_BREATH_CYCLE = 2 , EFF_SINGLE = 3,
EFF_WAVE = 4, EFF_RIPPLE = 5,
EFF_CROSS = 6, EFF_RAIN = 7,
EFF_STAR = 8, EFF_SNAKE = 9,
EFF_REC = 10, EFF_MULTI_1 = 0xE0,
EFF_MULTI_2 = 0xE1, EFF_MULTI_3 =
0xE2, EFF_MULTI_4 = 0xE3, EFF_OFF = 0xFE};

Confidential. All rights reserved.


System data related function
TCHAR * GetNowTime()
Description: Obtain current system time
Function name : GetNowTime
variable:
return : TCHAR : string index format is %Y %m/%d %H:%M %S
note:

LONG GetNowCPUUsage()
Description: obtain current CPU usuage ratio
Function name: GetNowCPUUsage
variable :
returns : LONG : 0 ~ 100 integer
note :

Confidential. All rights reserved.


DWORD GetRamUsage()
Description: Obtain current RAM usuage ratio
Function name: GetRamUsage
variable :
returns : DWORD : 0 ~ 100 integer
note :

float GetNowVolumePeekValue()
Description: Obtain current volume
Function name : GetNowVolumePeekValue
variable :
returns : float : 0 ~ 1 float number
note :

Confidential. All rights reserved.


Device operation function

Void SetControlDevice(DEVICE_INDEX devIndex)


Description: set operating device
Function name: SetControlDevic
variable : DEVICE_INDEX: device list
DEV_MKeys_L,
DEV_MKeys_S,
DEV_MMouse_M,
returns :
note :

bool IsDevicePlug()
Description: verify if the deviced is plugged in
Function name : IsDevicePlug
variable :

returns: bool : true plugged in,false not plugged in

note :

10

Confidential. All rights reserved.


LAYOUT_KEYOBARD GetDeviceLayout()
Description: Obtain current device layout
Function name: GetDeviceLayout
variable :
returns: LAYOUT_KEYOBARD List:
currently 3 LAYOUT_UNINIT ,
LAYOUT_US , LAYOUT_EU
note:

bool EnableLedControl(bool bEnable)


Description: set control over device’s LED
Function name: EnableLedControl
variable : bool bEnable:
true Controlled by SW,
false Controlled by FW,
returns : bool : true Success,false Fail
note :

11

Confidential. All rights reserved.


bool SwitchLedEffect(EFF_INDEX iEffectIndex)
Description: switch device current effect
Function name: SwitchLedEffect
variable : EFF_INDEX iEffectIndex: index value of the effect

returns : bool : true Success,false Fail

note :

bool SetFullLedColor(BYTE r, BYTE g, BYTE b )


Description: set entire keyboard LED color
Function name : SetFullLedColor
variable : BYTE r :red, BYTE g :green, BYTE b :blue

returns : bool : true Success,false Fail

note :

12

Confidential. All rights reserved.


bool SetAllLedColor(COLOR_MATRIX colorMatrix )
Description: Set Keyboard "every LED" color
Function name: SetAllLedColor
variable : COLOR_MATRIX colorMatrix:structure,
fill up RGB value according to LED Table
returns : bool : true Success,false Fail
note :

bool SetLedColor(int iRow, int iColumn, BYTE r, BYTE g, BYTE b )


Description: Set single Key LED color
Function name: SetLedColor
variable: int iRow: row,
int iColumn:column BYTE r :red,
BYTE g :green, BYTE b :blue

returns : bool : true Success,false Fail

note :

13

Confidential. All rights reserved.


SDK example
SDK examples illustrate

Examples UI screen

14

Confidential. All rights reserved.


Development environment: VC ++ 2008

1. System Information: for the user's computer to fetch the local system time, CPU
usage, memory usage percentage, the current playback volume percentage.
2. Select Device: to select the device that you want to control, the default option is
MasterKeys Pro L.
3. LED Control: can choose from enable and disable, in the disable state can switch
effects; in the enable state can setup the keyboard LED color
4. Set LED Color for every Key: is allowed to set different colors of each key, there are
two ways to set up. One is to set a single Key; the other one is to set all keys on the
keyboard to specified / different color. Please use the drop-down menu and select
Row Column with "CoolerMaster LED Table.xls" table to determine the location
specified color.
5. Set All Led: set the whole keyboard as a single color quickly.

15

Confidential. All rights reserved.

You might also like