Eli Hughes / Mbed 2 deprecated RobotPowerLogger-V2

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SmartSwitch.h Source File

SmartSwitch.h

00001 #include "System.h"
00002 
00003 #ifndef SMART_SWITCH_H
00004 #define SMART_SWITCH_H
00005 
00006 extern DigitalOut EnableSmartSwitchPower;
00007 extern DigitalOut SmartSwitch_SS;
00008 extern DigitalOut SmartSwitch_SCK;
00009 extern DigitalOut SmartSwitch_SDI;
00010 
00011 #define SMART_SWITCH_CMD_DISPLAY_DATA           0x55
00012 #define SMART_SWITCH_CMD_SET_BACKLIGHT_COLOR    0x40
00013 #define SMART_SWITCH_CMD_SET_BRIGHTNESS         0x41
00014 #define SMART_SWITCH_CMD_RESET                  0x5E
00015 #define SMART_SWITCH_CMD_RESET_PARAMETER        0x03
00016 
00017 #define SMART_SWITCH_BACKLIGHT_RED          (0x03<<4)
00018 #define SMART_SWITCH_BACKLIGHT_YELLOW       (0x03<<4)|(0x03<<2)
00019 #define SMART_SWITCH_BACKLIGHT_GREEN        (0x03<<2)
00020 
00021 
00022 
00023 void SmartSwitch_Reset();
00024 void SmartSwitch_SetBackLightColor(BYTE Red,BYTE Green,BYTE Blue);
00025 void SmartSwitch_SetBrightnss(BYTE Brightness);
00026 void InitSmartSwitch();
00027 void PowerUpSmartSwitch();
00028 void PowerDownSmartSwitch();
00029 void SmartSwitchWriteByte(BYTE DataOut);
00030 void SmartSwitch_SetBackLightColor2(BYTE RGB);
00031 void SmartSwitch_ImageDump(BYTE *Img);
00032 void SmartSwitchClear();
00033 
00034 #endif