|
@@ -108,65 +108,65 @@ void led(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, uint8_t a) {
|
|
else GPIO_ResetBits(GPIOx,GPIO_Pin);
|
|
else GPIO_ResetBits(GPIOx,GPIO_Pin);
|
|
}
|
|
}
|
|
|
|
|
|
-uint8_t all_whilte_light(uint8_t cmd)
|
|
|
|
-{
|
|
|
|
- // A
|
|
|
|
- led(A_LED1_GPIO_PORT,A_LED1_PIN,cmd);//red
|
|
|
|
- led(A_LED3_GPIO_PORT,A_LED3_PIN,cmd);//green
|
|
|
|
- led(A_LED4_GPIO_PORT,A_LED4_PIN,cmd);//red
|
|
|
|
- led(A_LED6_GPIO_PORT,A_LED6_PIN,cmd);//green
|
|
|
|
- led(A_LED7_GPIO_PORT,A_LED7_PIN,cmd);//red
|
|
|
|
- led(A_LED9_GPIO_PORT,A_LED9_PIN,cmd);//green
|
|
|
|
- led(A_LED10_GPIO_PORT,A_LED10_PIN,cmd);//red
|
|
|
|
- led(A_LED12_GPIO_PORT,A_LED12_PIN,cmd);//green
|
|
|
|
- led(A_LED13_GPIO_PORT,A_LED13_PIN,cmd);//red
|
|
|
|
- led(A_LED15_GPIO_PORT,A_LED15_PIN,cmd);//green
|
|
|
|
- led(A_LED16_GPIO_PORT,A_LED16_PIN,cmd);//red
|
|
|
|
- led(A_LED18_GPIO_PORT,A_LED18_PIN,cmd);//green
|
|
|
|
-
|
|
|
|
- // B
|
|
|
|
- led(B_LED1_GPIO_PORT,B_LED1_PIN,cmd);//red
|
|
|
|
- led(B_LED3_GPIO_PORT,B_LED3_PIN,cmd);//green
|
|
|
|
- led(B_LED4_GPIO_PORT,B_LED4_PIN,cmd);//red
|
|
|
|
- led(B_LED6_GPIO_PORT,B_LED6_PIN,cmd);//green
|
|
|
|
- led(B_LED7_GPIO_PORT,B_LED7_PIN,cmd);//red
|
|
|
|
- led(B_LED9_GPIO_PORT,B_LED9_PIN,cmd);//green
|
|
|
|
- led(B_LED10_GPIO_PORT,B_LED10_PIN,cmd);//red
|
|
|
|
- led(B_LED12_GPIO_PORT,B_LED12_PIN,cmd);//green
|
|
|
|
- led(B_LED13_GPIO_PORT,B_LED13_PIN,cmd);//red
|
|
|
|
- led(B_LED15_GPIO_PORT,B_LED15_PIN,cmd);//green
|
|
|
|
- led(B_LED16_GPIO_PORT,B_LED16_PIN,cmd);//red
|
|
|
|
- led(B_LED18_GPIO_PORT,B_LED18_PIN,cmd);//green
|
|
|
|
-
|
|
|
|
- // C
|
|
|
|
- led(C_LED1_GPIO_PORT,C_LED1_PIN,cmd);//red
|
|
|
|
- led(C_LED3_GPIO_PORT,C_LED3_PIN,cmd);//green
|
|
|
|
- led(C_LED4_GPIO_PORT,C_LED4_PIN,cmd);//red
|
|
|
|
- led(C_LED6_GPIO_PORT,C_LED6_PIN,cmd);//green
|
|
|
|
- led(C_LED7_GPIO_PORT,C_LED7_PIN,cmd);//red
|
|
|
|
- led(C_LED9_GPIO_PORT,C_LED9_PIN,cmd);//green
|
|
|
|
- led(C_LED10_GPIO_PORT,C_LED10_PIN,cmd);//red
|
|
|
|
- led(C_LED12_GPIO_PORT,C_LED12_PIN,cmd);//green
|
|
|
|
- led(C_LED13_GPIO_PORT,C_LED13_PIN,cmd);//red
|
|
|
|
- led(C_LED15_GPIO_PORT,C_LED15_PIN,cmd);//green
|
|
|
|
- led(C_LED16_GPIO_PORT,C_LED16_PIN,cmd);//red
|
|
|
|
- led(C_LED18_GPIO_PORT,C_LED18_PIN,cmd);//green
|
|
|
|
-
|
|
|
|
- // D
|
|
|
|
- led(D_LED1_GPIO_PORT,D_LED1_PIN,cmd);//red
|
|
|
|
- led(D_LED3_GPIO_PORT,D_LED3_PIN,cmd);//green
|
|
|
|
- led(D_LED4_GPIO_PORT,D_LED4_PIN,cmd);//red
|
|
|
|
- led(D_LED6_GPIO_PORT,D_LED6_PIN,cmd);//green
|
|
|
|
- led(D_LED7_GPIO_PORT,D_LED7_PIN,cmd);//red
|
|
|
|
- led(D_LED9_GPIO_PORT,D_LED9_PIN,cmd);//green
|
|
|
|
- led(D_LED10_GPIO_PORT,D_LED10_PIN,cmd);//red
|
|
|
|
- led(D_LED12_GPIO_PORT,D_LED12_PIN,cmd);//green
|
|
|
|
- led(D_LED13_GPIO_PORT,D_LED13_PIN,cmd);//red
|
|
|
|
- led(D_LED15_GPIO_PORT,D_LED15_PIN,cmd);//green
|
|
|
|
- led(D_LED16_GPIO_PORT,D_LED16_PIN,cmd);//red
|
|
|
|
- led(D_LED18_GPIO_PORT,D_LED18_PIN,cmd);//green
|
|
|
|
- return 1;
|
|
|
|
-}
|
|
|
|
|
|
+//uint8_t all_whilte_light(uint8_t cmd)
|
|
|
|
+//{
|
|
|
|
+// // A
|
|
|
|
+// led(A_LED1_GPIO_PORT,A_LED1_PIN,cmd);//red
|
|
|
|
+// led(A_LED3_GPIO_PORT,A_LED3_PIN,cmd);//green
|
|
|
|
+// led(A_LED4_GPIO_PORT,A_LED4_PIN,cmd);//red
|
|
|
|
+// led(A_LED6_GPIO_PORT,A_LED6_PIN,cmd);//green
|
|
|
|
+// led(A_LED7_GPIO_PORT,A_LED7_PIN,cmd);//red
|
|
|
|
+// led(A_LED9_GPIO_PORT,A_LED9_PIN,cmd);//green
|
|
|
|
+// led(A_LED10_GPIO_PORT,A_LED10_PIN,cmd);//red
|
|
|
|
+// led(A_LED12_GPIO_PORT,A_LED12_PIN,cmd);//green
|
|
|
|
+// led(A_LED13_GPIO_PORT,A_LED13_PIN,cmd);//red
|
|
|
|
+// led(A_LED15_GPIO_PORT,A_LED15_PIN,cmd);//green
|
|
|
|
+// led(A_LED16_GPIO_PORT,A_LED16_PIN,cmd);//red
|
|
|
|
+// led(A_LED18_GPIO_PORT,A_LED18_PIN,cmd);//green
|
|
|
|
+//
|
|
|
|
+// // B
|
|
|
|
+// led(B_LED1_GPIO_PORT,B_LED1_PIN,cmd);//red
|
|
|
|
+// led(B_LED3_GPIO_PORT,B_LED3_PIN,cmd);//green
|
|
|
|
+// led(B_LED4_GPIO_PORT,B_LED4_PIN,cmd);//red
|
|
|
|
+// led(B_LED6_GPIO_PORT,B_LED6_PIN,cmd);//green
|
|
|
|
+// led(B_LED7_GPIO_PORT,B_LED7_PIN,cmd);//red
|
|
|
|
+// led(B_LED9_GPIO_PORT,B_LED9_PIN,cmd);//green
|
|
|
|
+// led(B_LED10_GPIO_PORT,B_LED10_PIN,cmd);//red
|
|
|
|
+// led(B_LED12_GPIO_PORT,B_LED12_PIN,cmd);//green
|
|
|
|
+// led(B_LED13_GPIO_PORT,B_LED13_PIN,cmd);//red
|
|
|
|
+// led(B_LED15_GPIO_PORT,B_LED15_PIN,cmd);//green
|
|
|
|
+// led(B_LED16_GPIO_PORT,B_LED16_PIN,cmd);//red
|
|
|
|
+// led(B_LED18_GPIO_PORT,B_LED18_PIN,cmd);//green
|
|
|
|
+//
|
|
|
|
+// // C
|
|
|
|
+// led(C_LED1_GPIO_PORT,C_LED1_PIN,cmd);//red
|
|
|
|
+// led(C_LED3_GPIO_PORT,C_LED3_PIN,cmd);//green
|
|
|
|
+// led(C_LED4_GPIO_PORT,C_LED4_PIN,cmd);//red
|
|
|
|
+// led(C_LED6_GPIO_PORT,C_LED6_PIN,cmd);//green
|
|
|
|
+// led(C_LED7_GPIO_PORT,C_LED7_PIN,cmd);//red
|
|
|
|
+// led(C_LED9_GPIO_PORT,C_LED9_PIN,cmd);//green
|
|
|
|
+// led(C_LED10_GPIO_PORT,C_LED10_PIN,cmd);//red
|
|
|
|
+// led(C_LED12_GPIO_PORT,C_LED12_PIN,cmd);//green
|
|
|
|
+// led(C_LED13_GPIO_PORT,C_LED13_PIN,cmd);//red
|
|
|
|
+// led(C_LED15_GPIO_PORT,C_LED15_PIN,cmd);//green
|
|
|
|
+// led(C_LED16_GPIO_PORT,C_LED16_PIN,cmd);//red
|
|
|
|
+// led(C_LED18_GPIO_PORT,C_LED18_PIN,cmd);//green
|
|
|
|
+//
|
|
|
|
+// // D
|
|
|
|
+// led(D_LED1_GPIO_PORT,D_LED1_PIN,cmd);//red
|
|
|
|
+// led(D_LED3_GPIO_PORT,D_LED3_PIN,cmd);//green
|
|
|
|
+// led(D_LED4_GPIO_PORT,D_LED4_PIN,cmd);//red
|
|
|
|
+// led(D_LED6_GPIO_PORT,D_LED6_PIN,cmd);//green
|
|
|
|
+// led(D_LED7_GPIO_PORT,D_LED7_PIN,cmd);//red
|
|
|
|
+// led(D_LED9_GPIO_PORT,D_LED9_PIN,cmd);//green
|
|
|
|
+// led(D_LED10_GPIO_PORT,D_LED10_PIN,cmd);//red
|
|
|
|
+// led(D_LED12_GPIO_PORT,D_LED12_PIN,cmd);//green
|
|
|
|
+// led(D_LED13_GPIO_PORT,D_LED13_PIN,cmd);//red
|
|
|
|
+// led(D_LED15_GPIO_PORT,D_LED15_PIN,cmd);//green
|
|
|
|
+// led(D_LED16_GPIO_PORT,D_LED16_PIN,cmd);//red
|
|
|
|
+// led(D_LED18_GPIO_PORT,D_LED18_PIN,cmd);//green
|
|
|
|
+// return 1;
|
|
|
|
+//}
|
|
uint8_t all_green_light(uint8_t cmd)
|
|
uint8_t all_green_light(uint8_t cmd)
|
|
{
|
|
{
|
|
// A
|
|
// A
|
|
@@ -275,7 +275,7 @@ uint8_t all_yellow_light(uint8_t cmd)
|
|
}
|
|
}
|
|
uint8_t all_light(uint8_t cmd)
|
|
uint8_t all_light(uint8_t cmd)
|
|
{
|
|
{
|
|
- all_whilte_light(cmd);
|
|
|
|
|
|
+// all_whilte_light(cmd);
|
|
all_green_light(cmd);
|
|
all_green_light(cmd);
|
|
all_red_light(cmd);
|
|
all_red_light(cmd);
|
|
all_yellow_light(cmd);
|
|
all_yellow_light(cmd);
|