fix traffic lights
This commit is contained in:
Binary file not shown.
@@ -1,17 +1,17 @@
|
||||
03:14:32 **** Incremental Build of configuration Debug for project TrafficLightsPlus ****
|
||||
14:43:49 **** Incremental Build of configuration Debug for project TrafficLightsPlus ****
|
||||
make -j8 all
|
||||
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F429xx -c -I../Core/Inc -I../USB_HOST/App -I../USB_HOST/Target -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
|
||||
arm-none-eabi-gcc "../Core/Src/breadboard.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F429xx -c -I../Core/Inc -I../USB_HOST/App -I../USB_HOST/Target -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/breadboard.d" -MT"Core/Src/breadboard.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/breadboard.o"
|
||||
arm-none-eabi-gcc -o "TrafficLightsPlus.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/ja/st/Home/TrafficLightsPlus/STM32F429ZITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="TrafficLightsPlus.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
|
||||
Finished building target: TrafficLightsPlus.elf
|
||||
|
||||
arm-none-eabi-size TrafficLightsPlus.elf
|
||||
arm-none-eabi-objdump -h -S TrafficLightsPlus.elf > "TrafficLightsPlus.list"
|
||||
text data bss dec hex filename
|
||||
32528 16 3480 36024 8cb8 TrafficLightsPlus.elf
|
||||
32576 16 3480 36072 8ce8 TrafficLightsPlus.elf
|
||||
Finished building: default.size.stdout
|
||||
|
||||
Finished building: TrafficLightsPlus.list
|
||||
|
||||
|
||||
03:14:33 Build Finished. 0 errors, 0 warnings. (took 639ms)
|
||||
14:43:50 Build Finished. 0 errors, 0 warnings. (took 703ms)
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
03:14:32 **** Incremental Build of configuration Debug for project TrafficLightsPlus ****
|
||||
14:43:49 **** Incremental Build of configuration Debug for project TrafficLightsPlus ****
|
||||
make -j8 all
|
||||
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F429xx -c -I../Core/Inc -I../USB_HOST/App -I../USB_HOST/Target -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
|
||||
arm-none-eabi-gcc "../Core/Src/breadboard.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F429xx -c -I../Core/Inc -I../USB_HOST/App -I../USB_HOST/Target -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/breadboard.d" -MT"Core/Src/breadboard.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/breadboard.o"
|
||||
arm-none-eabi-gcc -o "TrafficLightsPlus.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/ja/st/Home/TrafficLightsPlus/STM32F429ZITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="TrafficLightsPlus.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
|
||||
Finished building target: TrafficLightsPlus.elf
|
||||
|
||||
arm-none-eabi-size TrafficLightsPlus.elf
|
||||
arm-none-eabi-objdump -h -S TrafficLightsPlus.elf > "TrafficLightsPlus.list"
|
||||
text data bss dec hex filename
|
||||
32528 16 3480 36024 8cb8 TrafficLightsPlus.elf
|
||||
32576 16 3480 36072 8ce8 TrafficLightsPlus.elf
|
||||
Finished building: default.size.stdout
|
||||
|
||||
Finished building: TrafficLightsPlus.list
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
/*
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
#define R_Pin RedLight_Pin
|
||||
#define Y_Pin YellowLight_Pin
|
||||
#define G_Pin GreenLight_Pin
|
||||
|
||||
#define R_Prt RedLight_GPIO_Port
|
||||
#define Y_Prt YellowLight_GPIO_Port
|
||||
#define G_Prt GreenLight_GPIO_Port
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
/*
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
*/
|
||||
|
||||
HAL_GPIO_TogglePin(R_Prt, R_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(R_Prt, R_Pin);
|
||||
|
||||
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
|
||||
|
||||
HAL_GPIO_TogglePin(G_Prt, G_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(G_Prt, G_Pin);
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
#define R_Pin RedLight_Pin
|
||||
#define Y_Pin YellowLight_Pin
|
||||
#define G_Pin GreenLight_Pin
|
||||
|
||||
#define R_Prt RedLight_GPIO_Port
|
||||
#define Y_Prt YellowLight_GPIO_Port
|
||||
#define G_Prt GreenLight_GPIO_Port
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
|
||||
HAL_GPIO_TogglePin(R_Prt, R_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(R_Prt, R_Pin);
|
||||
|
||||
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
|
||||
|
||||
HAL_GPIO_TogglePin(G_Prt, G_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(G_Prt, G_Pin);
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
#define R_Pin RedLight_Pin
|
||||
#define Y_Pin YellowLight_Pin
|
||||
#define G_Pin GreenLight_Pin
|
||||
|
||||
#define R_Prt RedLight_GPIO_Port
|
||||
#define Y_Prt YellowLight_GPIO_Port
|
||||
#define G_Prt GreenLight_GPIO_Port
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
/*
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
*/
|
||||
|
||||
HAL_GPIO_TogglePin()
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
#define R_Pin RedLight_Pin
|
||||
#define Y_Pin YellowLight_Pin
|
||||
#define G_Pin GreenLight_Pin
|
||||
|
||||
#define R_Prt RedLight_GPIO_Port
|
||||
#define Y_Prt YellowLight_GPIO_Port
|
||||
#define G_Prt GreenLight_GPIO_Port
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
/*
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
*/
|
||||
|
||||
HAL_GPIO_TogglePin(R_Port, R_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(R_Port, R_Pin);
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
#define R_Pin RedLight_Pin
|
||||
#define Y_Pin YellowLight_Pin
|
||||
#define G_Pin GreenLight_Pin
|
||||
|
||||
#define R_Prt RedLight_GPIO_Port
|
||||
#define Y_Prt YellowLight_GPIO_Port
|
||||
#define G_Prt GreenLight_GPIO_Port
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
/*
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
*/
|
||||
|
||||
HAL_GPIO_TogglePin(R_Port, R_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(R_Port, R_Pin);
|
||||
|
||||
HAL_GPIO_TogglePin(Y_Port, Y_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(Y_Port, Y_Pin);
|
||||
|
||||
HAL_GPIO_TogglePin(G_Port, G_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
HAL_GPIO_TogglePin(G_Port, G_Pin);
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
#define R_Pin RedLight_Pin
|
||||
#define Y_Pin YellowLight_Pin
|
||||
#define G_Pin GreenLight_Pin
|
||||
|
||||
#define R_Prt RedLight_GPIO_Port
|
||||
#define Y_Prt YellowLight_GPIO_Port
|
||||
#define G_Prt GreenLight_GPIO_Port
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
/*
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
*/
|
||||
|
||||
HAL_GPIO_TogglePin(R_Port, R_Pin);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* breadboard.c
|
||||
*
|
||||
* Created on: Sep 17, 2025
|
||||
* Author: ja
|
||||
*/
|
||||
|
||||
/*
|
||||
* #define RedLight_Pin GPIO_PIN_2
|
||||
* #define RedLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define YellowLight_Pin GPIO_PIN_3
|
||||
* #define YellowLight_GPIO_Port GPIOE
|
||||
*
|
||||
* #define GreenLight_Pin GPIO_PIN_4
|
||||
* #define GreenLight_GPIO_Port GPIOE
|
||||
*
|
||||
* RedLight: PE2
|
||||
* YellowLight: PE3
|
||||
* GreenLight: PE4
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "breadboard.h"
|
||||
|
||||
#define R_Pin RedLight_Pin
|
||||
#define Y_Pin YellowLight_Pin
|
||||
#define G_Pin GreenLight_Pin
|
||||
|
||||
#define R_Prt RedLight_GPIO_Port
|
||||
#define Y_Prt YellowLight_GPIO_Port
|
||||
#define G_Prt GreenLight_GPIO_Port
|
||||
|
||||
// HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET);
|
||||
void
|
||||
breadboard(int traffSPD)
|
||||
{
|
||||
// Traffic Light
|
||||
/*
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, RedLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, RedLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(RedLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, YellowLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
|
||||
HAL_GPIO_WritePin(YellowLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GreenLight_GPIO_Port, GreenLight_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(traffSPD);
|
||||
*/
|
||||
|
||||
HAL_GPIO_TogglePin(R_Port, R_Pin);
|
||||
|
||||
|
||||
// Walk signal
|
||||
|
||||
// Light dimmer
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.metadata/.plugins/org.eclipse.core.resources/16.snap
Normal file
BIN
.metadata/.plugins/org.eclipse.core.resources/16.snap
Normal file
Binary file not shown.
@@ -1,3 +1,12 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.debug.ui.MemoryHistoryKnownColor=235,235,235
|
||||
org.eclipse.debug.ui.MemoryHistoryUnknownColor=170,175,185
|
||||
org.eclipse.debug.ui.PREF_CHANGED_VALUE_BACKGROUND=150,80,115
|
||||
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<launchPerspectives/>\n
|
||||
org.eclipse.debug.ui.changedDebugElement=255,128,128
|
||||
org.eclipse.debug.ui.consoleBackground=53,53,53
|
||||
org.eclipse.debug.ui.errorColor=225,30,70
|
||||
org.eclipse.debug.ui.inColor=140,175,210
|
||||
org.eclipse.debug.ui.outColor=235,235,235
|
||||
overriddenByCSS=,org.eclipse.debug.ui.MemoryHistoryKnownColor,org.eclipse.debug.ui.MemoryHistoryUnknownColor,org.eclipse.debug.ui.PREF_CHANGED_VALUE_BACKGROUND,org.eclipse.debug.ui.changedDebugElement,org.eclipse.debug.ui.consoleBackground,org.eclipse.debug.ui.errorColor,org.eclipse.debug.ui.inColor,org.eclipse.debug.ui.outColor,
|
||||
preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget|
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user