lknds

Dependencies:   mbed TrapezoidControl Pulse QEI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Process.h Source File

Process.h

00001 #ifndef PROCESS_H_
00002 #define PROCESS_H_
00003 
00004 #include "mbed.h"
00005 
00006 #define BUZZER_PIN PB_3
00007 #define EMG_0 LimitSw::IsPressed(0)
00008 #define EMG_1 LimitSw::IsPressed(1)
00009 
00010 void SystemProcess();
00011 
00012 #define  TIRE_FL  0
00013 #define  TIRE_FR  3
00014 #define  TIRE_BL  1
00015 #define  TIRE_BR  2
00016 
00017 #define  LIFT_LB  4
00018 #define  LIFT_RB  5
00019 #define  LIFT_U   6
00020 
00021 #define  LSW_LB   0
00022 #define  LSW_RB   1
00023 
00024 #define  ECHO_0  PC_3
00025 #define  ECHO_1  PC_1
00026     
00027 #define  TRIG_0  PC_0
00028 #define  TRIG_1  PB_0
00029         
00030 #define  TEMP    PC_2
00031 
00032 #define RED 0
00033 #define BLUE 1
00034 //4~7は使っています
00035 //#define CLOTHESPIN solenoid.solenoid2
00036 #define RED_OR_BLUE 8
00037 #define STARTSW 15
00038 #define LEFTlim 1
00039 #define RIGHTlim 2
00040 #define SELECT_1 PB_8//LS18
00041 #define SELECT_2 PC_9//LS19
00042 #define SELECT_3 PC_8//LS20
00043 /*
00044 #define  ECHO_0  D4
00045 #define  ECHO_1  PC_1
00046     
00047 #define  TRIG_0  D5
00048 #define  TRIG_1  PB_0
00049         
00050 #define  TEMP    PC_2
00051 
00052 */
00053 
00054 
00055 typedef union
00056 {
00057     struct
00058     {
00059         unsigned int blue : 8;
00060         unsigned int green : 8;
00061         unsigned int red : 8;
00062         unsigned int : 8;
00063     };
00064     uint32_t code;
00065 } TapeLedData;
00066 
00067 enum TapeLED_Mode
00068 {
00069     EMS,
00070     Normal,
00071     Launch,
00072 };
00073 
00074 enum TapeLED_Color
00075 {
00076     Black                   = 0x000000,
00077     // Red                  = 0xff0000,
00078     Green                   = 0x008000,
00079     Blue                    = 0x0000ff,
00080     White                   = 0xffffff,
00081     // Orange                   = 0xffa500,
00082     // Yellow                   = 0xffff00,
00083     // Purple                   = 0x800080,
00084     // Cyan                 = 0x00ffff,
00085     // Magenta                  = 0xff00ff,
00086     // Lime                 = 0x00ff00
00087 
00088 
00089     Dimgray                 = 0x696969,
00090     Gray                    = 0x808080,
00091     DarkGray                = 0xa9a9a9,
00092     Silver                  = 0xc0c0c0,
00093     LightGray               = 0xd3d3d3,
00094     Gainsboro               = 0xdcdcdc,
00095     Whitesmoke              = 0xf5f5f5,
00096     Snow                    = 0xfffafa,
00097     Ghostwhite              = 0xf8f8ff,
00098     Floralwhite             = 0xfffaf0,
00099     Linen                   = 0xfaf0e6,
00100     Antiquewhite            = 0xfaebd7,
00101     Papayawhip              = 0xffefd5,
00102     Blanchedalmond          = 0xffebcd,
00103     Bisque                  = 0xffe4c4,
00104     Moccasin                = 0xffe4b5,
00105     Navajowhite             = 0xffdead,
00106     Peachpuff               = 0xffdab9,
00107     Mistyrose               = 0xffe4e1,
00108     Lavenderblush           = 0xfff0f5,
00109     Seashell                = 0xfff5ee,
00110     Oldlace                 = 0xfdf5e6,
00111     Ivory                   = 0xfffff0,
00112     Honeydew                = 0xf0fff0,
00113     Mintcream               = 0xf5fffa,
00114     Azure                   = 0xf0ffff,
00115     Aliceblue               = 0xf0f8ff,
00116     Lavender                = 0xe6e6fa,
00117     Lightsteelblue          = 0xb0c4de,
00118     Lightslategray          = 0x778899,
00119     Slategray               = 0x708090,
00120     Steelblue               = 0x4682b4,
00121     Royalblue               = 0x4169e1,
00122     Midnightblue            = 0x191970,
00123     Navy                    = 0x000080,
00124     Darkblue                = 0x00008b,
00125     Mediumblue              = 0x0000cd,
00126     Dodgerblue              = 0x1e90ff,
00127     Cornflowerblue          = 0x6495ed,
00128     Deepskyblue             = 0x00bfff,
00129     Lightskyblue            = 0x87cefa,
00130     Skyblue                 = 0x87ceeb,
00131     Lightblue               = 0xadd8e6,
00132     Powderblue              = 0xb0e0e6,
00133     Paleturquoise           = 0xafeeee,
00134     // Lightcyan                = 0xe0ffff,
00135     Cyan                    = 0x00ffff,
00136     // Aqua                 = 0x00ffff,
00137     Turquoise               = 0x40e0d0,
00138     Mediumturquoise         = 0x48d1cc,
00139     Darkturquoise           = 0x00ced1,
00140     Lightseagreen           = 0x20b2aa,
00141     Cabetblue               = 0x5f9ea0,
00142     Darkcyan                = 0x008b8b,
00143     Teal                    = 0x008080,
00144     Darkslategray           = 0x2f4f4f,
00145     Darkgreen               = 0x006400,
00146     Forestgreen             = 0x228b22,
00147     Seagreen                = 0x2e8b57,
00148     Mediumseagreen          = 0x3cb371,
00149     Mediumaquamarine        = 0x66cdaa,
00150     Darkseagreen            = 0x8fbc8f,
00151     Aquamarine              = 0x7fffd4,
00152     Palegreen               = 0x98fb98,
00153     Lightgreen              = 0x90ee90,
00154     Springgreen             = 0x00ff7f,
00155     Mediumspringgreen       = 0x00fa9a,
00156     Lawngreen               = 0x7cfc00,
00157     Chartreuse              = 0x7fff00,
00158     Greenyellow             = 0xadff2f,
00159     Lime                    = 0x00ff00,
00160     Limegreen               = 0x32cd32,
00161     Yellowgreen             = 0x9acd32,
00162     Darkolivegreen          = 0x556b2f,
00163     Olivedrab               = 0x6b8e23,
00164     Olive                   = 0x808000,
00165     Darkkhaki               = 0xbdb76b,
00166     Palegoldenrod           = 0xeee8aa,
00167     Cornsilk                = 0xfff8dc,
00168     Beige                   = 0xf5f5dc,
00169     Lightyellow             = 0xffffe0,
00170     Lightgoldenrodyellow    = 0xfafad2,
00171     Lemonchiffon            = 0xfffacd,
00172     Wheat                   = 0xf5deb3,
00173     Burlywood               = 0xdeb887,
00174     Tan                     = 0xd2b48c,
00175     Khaki                   = 0xf0e68c,
00176     Yellow                  = 0xffff00,
00177     Gold                    = 0xffd700,
00178     // Orange                   = 0xffa500,
00179     Orange                  = 0xff2500,
00180     Sandybrown              = 0xf4a460,
00181     Darkorange              = 0xff8c00,
00182     Goldenrod               = 0xdaa520,
00183     Peru                    = 0xcd853f,
00184     Darkgoldenrod           = 0xb8860d,
00185     Chocolate               = 0xd2691e,
00186     Sienna                  = 0xa0522d,
00187     Saddlebrown             = 0x8b4513,
00188     Marron                  = 0x800000,
00189     Darkred                 = 0x8b0000,
00190     Brown                   = 0xa52a2a,
00191     Firebrick               = 0xb22222,
00192     Indeanred               = 0xcd5c5c,
00193     Rosybrown               = 0xbc8f8f,
00194     Darksalmon              = 0xe9967a,
00195     Lightcoral              = 0xf08080,
00196     Salmon                  = 0xfa8072,
00197     Lightsalmon             = 0xffa07a,
00198     Coral                   = 0xff7f50,
00199     Tomato                  = 0xff6347,
00200     Orangered               = 0xff4500,
00201     Red                     = 0xff0000,
00202     Crimson                 = 0xdc143c,
00203     Mediumvioletred         = 0xc71585,
00204     Deeppink                = 0xff1493,
00205     Hotpink                 = 0xff69b4,
00206     Palevioletred           = 0xdb7093,
00207     Pink                    = 0xffc0cb,
00208     Lightpink               = 0xffb6c1,
00209     Thistle                 = 0xd8bfd8,
00210     Magenta                 = 0xff00ff,
00211     // Fuchsia                  = 0xff00ff,
00212     Violet                  = 0xee82ee,
00213     Plum                    = 0xdda0dd,
00214     Orchid                  = 0xda70d6,
00215     Mediumorchid            = 0xba55d3,
00216     Darkorchid              = 0x9932cc,
00217     Darkviolet              = 0x9400d3,
00218     Darkmagenta             = 0x8b008b,
00219     Purple                  = 0x800080,
00220     Indigo                  = 0x4b0082,
00221     Darkslateblue           = 0x483d8b,
00222     Blueviolet              = 0x8a2be2,
00223     Mediumpurple            = 0x9370db,
00224     Slateblue               = 0x6a5acd,
00225     Mediumslateblue         = 0x7b68ee
00226 };
00227 
00228 extern TapeLedData sendLedData;
00229 
00230 #endif