Eli Hughes
/
RobotPowerLogger-V2
For Terrance
Diff: Headers/SmartSwitch.h
- Revision:
- 0:085749c8446f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Headers/SmartSwitch.h Wed Jun 13 15:10:06 2012 +0000 @@ -0,0 +1,34 @@ +#include "System.h" + +#ifndef SMART_SWITCH_H +#define SMART_SWITCH_H + +extern DigitalOut EnableSmartSwitchPower; +extern DigitalOut SmartSwitch_SS; +extern DigitalOut SmartSwitch_SCK; +extern DigitalOut SmartSwitch_SDI; + +#define SMART_SWITCH_CMD_DISPLAY_DATA 0x55 +#define SMART_SWITCH_CMD_SET_BACKLIGHT_COLOR 0x40 +#define SMART_SWITCH_CMD_SET_BRIGHTNESS 0x41 +#define SMART_SWITCH_CMD_RESET 0x5E +#define SMART_SWITCH_CMD_RESET_PARAMETER 0x03 + +#define SMART_SWITCH_BACKLIGHT_RED (0x03<<4) +#define SMART_SWITCH_BACKLIGHT_YELLOW (0x03<<4)|(0x03<<2) +#define SMART_SWITCH_BACKLIGHT_GREEN (0x03<<2) + + + +void SmartSwitch_Reset(); +void SmartSwitch_SetBackLightColor(BYTE Red,BYTE Green,BYTE Blue); +void SmartSwitch_SetBrightnss(BYTE Brightness); +void InitSmartSwitch(); +void PowerUpSmartSwitch(); +void PowerDownSmartSwitch(); +void SmartSwitchWriteByte(BYTE DataOut); +void SmartSwitch_SetBackLightColor2(BYTE RGB); +void SmartSwitch_ImageDump(BYTE *Img); +void SmartSwitchClear(); + +#endif \ No newline at end of file