dude are colors even real

This commit is contained in:
jazz committed 2025-09-22 15:45:12 -05:00
1 parent a64dd0b1e5
commit 9e2e9f7773
211 files changed
+181603 -314

No files matched your search

@@ -15,3 +15,5 @@
*** SESSION Sep 20, 2025 00:17:43.78 -------------------------------------------
*** SESSION Sep 20, 2025 02:01:15.749 ------------------------------------------
*** SESSION Sep 20, 2025 22:34:37.42 -------------------------------------------
*** SESSION Sep 22, 2025 14:12:24.952 ------------------------------------------
*** SESSION Sep 22, 2025 14:25:48.576 ------------------------------------------
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project><configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1445703066" name="Debug"><extension point="org.eclipse.cdt.core.LanguageSettingsProvider"><provider id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector"><language id="org.eclipse.cdt.core.gcc"><entry kind="includePath" name="/home/ja/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/arm-none-eabi/include/newlib-nano"><flag value="BUILTIN|READONLY"/></entry><entry kind="includePath" name="/home/ja/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/lib/gcc/arm-none-eabi/13.3.1/include"><flag value="BUILTIN|READONLY"/></entry><entry kind="includePath" name="/home/ja/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/lib/gcc/arm-none-eabi/13.3.1/include-fixed"><flag value="BUILTIN|READONLY"/></entry><entry kind="includePath" name="/home/ja/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/arm-none-eabi/include"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ACCUM_FBIT__" value="15"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ACCUM_IBIT__" value="16"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ACCUM_MAX__" value="0X7FFFFFFFP-15K"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ACCUM_MIN__" value="(-0X1P15K-0X1P15K)"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__APCS_32__" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARMEL__" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_32BIT_STATE" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_ARCH" value="7"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_ARCH_7EM__" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_ARCH_EXT_IDIV__" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_ARCH_ISA_THUMB" value="2"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_ARCH_PROFILE" value="77"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_ASM_SYNTAX_UNIFIED__" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_EABI__" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_CLZ" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_COPROC" value="15"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_DSP" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_FMA" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_IDIV" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_LDREX" value="7"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_QBIT" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_SAT" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_SIMD32" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FEATURE_UNALIGNED" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_FP" value="4"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_PCS_VFP" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_SIZEOF_MINIMAL_ENUM" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ARM_SIZEOF_WCHAR_T" value="4"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ATOMIC_ACQUIRE" value="2"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ATOMIC_ACQ_REL" value="4"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ATOMIC_CONSUME" value="1"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ATOMIC_RELAXED" value="0"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ATOMIC_RELEASE" value="3"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__ATOMIC_SEQ_CST" value="5"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__BIGGEST_ALIGNMENT__" value="8"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__BYTE_ORDER__" value="__ORDER_LITTLE_ENDIAN__"><flag value="BUILTIN|READONLY"/></entry><entry kind="macro" name="__CHAR16_TYPE__" value="short unsigned int"><flag vaLine truncated
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<item key="LastUsedSourceTemplate" value="Default C source template"/>
<item key="LastUsedHeaderTemplate" value="Default C header template"/>
<item key="LastUsedSourceTemplate" value="Default C++ source template"/>
<item key="LastUsedHeaderTemplate" value="Default C++ header template"/>
<section name="completion_proposal_size">
</section>
<section name="org.eclipse.cdt.ui.text.hover.CMacroExpansionExploration">
@@ -28,4 +28,7 @@
</section>
<section name="CRenameRefactoringInputPage">
</section>
<section name="CResourceRenameRefactoringInputPage">
<item key="updateReferences" value="true"/>
</section>
</section>
@@ -0,0 +1,2 @@
635E684B79701B039C64EA45C3F84D30=76D5CABA7E36F5DD0D38ED323FA426B4
eclipse.preferences.version=1
@@ -0,0 +1,9 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboad.hpp"
@@ -21,7 +21,7 @@
* WalkLight: PE5
*
* Done: Traffic Light
* TODO: async? Walk Signal, Light Dimmer
* TODO: Light Dimmer
*/
#include "main.h"
@@ -38,44 +38,51 @@
#define W_Prt WalkLight_GPIO_Port
uint32_t trafftick_last;
uint32_t walktick_last;
uint8_t trafflight_index = 0;
void
starttick(void)
{
trafftick_last = HAL_GetTick();
walktick_last = HAL_GetTick();
}
void
trafflight(int traffSPD)
trafflight(int traffSPD, int walkSPD)
{
/*
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);
*/
uint32_t trafftick_curr = HAL_GetTick();
int ldelay2 = traffSPD * 2;
int ldelay3 = traffSPD * 3;
if ((trafftick_curr - trafftick_last) >= traffSPD) {
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_RESET);
switch (trafflight_index) {
case 0:
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_SET);
break;
case 1:
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_SET);
break;
case 2:
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_SET);
break;
case 0:
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_SET);
break;
case 1:
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_SET);
}
trafflight_index = (trafflight_index + 1) % 3;
trafftick_last = trafftick_curr;
HAL_GPIO_TogglePin(R_Prt, R_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay2) {
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay3) {
HAL_GPIO_TogglePin(G_Prt, G_Pin);
if ((trafftick_curr - walktick_last) >= walkSPD) {
HAL_GPIO_TogglePin(W_Prt, W_Pin);
walktick_last = trafftick_curr;
}
}
@@ -0,0 +1,10 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
@@ -0,0 +1,4 @@
635E684B79701B039C64EA45C3F84D30=76D5CABA7E36F5DD0D38ED323FA426B4
66BE74F758C12D739921AEA421D593D3=0
DC22A860405A8BF2F2C095E5B6529F12=BB3BD6F58A87E81DE6E549B37335B23A
eclipse.preferences.version=1
@@ -0,0 +1,13 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void SetTrafficLights(TrafficState s)
{
HAL_GPIO_WritePin(LED_Port,
}
@@ -0,0 +1,13 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void breadboard(void)
{
return;
}
@@ -0,0 +1,419 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
#include "breadboard.hpp"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
CRC_HandleTypeDef hcrc;
DMA2D_HandleTypeDef hdma2d;
TIM_HandleTypeDef htim1;
osThreadId defaultTaskHandle;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_CRC_Init(void);
static void MX_DMA2D_Init(void);
static void MX_TIM1_Init(void);
void StartDefaultTask(void const * argument);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_CRC_Init();
MX_DMA2D_Init();
MX_TIM1_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Create the thread(s) */
/* definition and creation of defaultTask */
osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 4096);
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 8;
RCC_OscInitStruct.PLL.PLLN = 72;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 3;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
/* USER CODE BEGIN CRC_Init 0 */
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
/**
* @brief DMA2D Initialization Function
* @param None
* @retval None
*/
static void MX_DMA2D_Init(void)
{
/* USER CODE BEGIN DMA2D_Init 0 */
/* USER CODE END DMA2D_Init 0 */
/* USER CODE BEGIN DMA2D_Init 1 */
/* USER CODE END DMA2D_Init 1 */
hdma2d.Instance = DMA2D;
hdma2d.Init.Mode = DMA2D_M2M;
hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
hdma2d.Init.OutputOffset = 0;
hdma2d.LayerCfg[1].InputOffset = 0;
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888;
hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
hdma2d.LayerCfg[1].InputAlpha = 0;
if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
{
Error_Handler();
}
if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DMA2D_Init 2 */
/* USER CODE END DMA2D_Init 2 */
}
/**
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
htim1.Init.Prescaler = 0;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 65535;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, White_Pin|Red_Pin|Yellow_Pin|Green_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin : PedButton_Pin */
GPIO_InitStruct.Pin = PedButton_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(PedButton_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : White_Pin Red_Pin Yellow_Pin Green_Pin */
GPIO_InitStruct.Pin = White_Pin|Red_Pin|Yellow_Pin|Green_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 15, 0);
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/* USER CODE BEGIN Header_StartDefaultTask */
/**
* @brief Function implementing the defaultTask thread.
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USER CODE END 5 */
}
/**
* @brief Period elapsed callback in non blocking mode
* @note This function is called when TIM6 interrupt took place, inside
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
* a global variable "uwTick" used as application time base.
* @param htim : TIM handle
* @retval None
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM6)
{
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -1,32 +0,0 @@
/*
* breadboard.c
*
* Created on: Sep 12, 2025
* Author: ja
*/
#include <stdbool.h>
#include "main.h"
void
breadboard(int DELAY_MS)
{
bool Purple = (HAL_GPIO_ReadPin(GPBTN_PRPL_GPIO_PortIOD, BTN_PRPL_Pin) == GPIO_PIN_SET); // PD5
bool Grey = (HAL_GPIO_ReadPin(BTN_GREY_GPIO_Port, BTN_GREY_Pin) == GPIO_PIN_SET); // PD7
if (!Purple && !Grey) { // inverted for ease of debug, assignment calls for (Purple && Grey)
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_SET); // PB4
} else {
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET); // PB4
}
HAL_Delay(DELAY_MS); // milliseconds of delay after execution
/*
// Always flash:
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_SET); // PB4 ON
HAL_Delay(DELAY_MS);
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_RESET); // PB4 OFF
HAL_Delay(DELAY_MS);
*/
}
@@ -0,0 +1,10 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
@@ -21,7 +21,7 @@
* WalkLight: PE5
*
* Done: Traffic Light
* TODO: async? Walk Signal, Light Dimmer
* TODO: Light Dimmer
*/
#include "main.h"
@@ -37,47 +37,54 @@
#define G_Prt GreenLight_GPIO_Port
#define W_Prt WalkLight_GPIO_Port
uint32_t redlight_last;
uint32_t ylwlight_last;
uint32_t grnlight_last;
uint32_t trafftick_last;
uint32_t walktick_last;
uint8_t trafflight_index = 0;
void
starttick(void)
{
trafftick_last = HAL_GetTick();
walktick_last = HAL_GetTick();
}
void
trafflight(int traffSPD)
trafflight(int traffSPD, int walkSPD)
{
/*
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);
*/
uint32_t trafftick_curr = HAL_GetTick();
int ldelay2 = traffSPD * 2;
int ldelay3 = traffSPD * 3;
if ((trafftick_curr - trafftick_last) >= traffSPD) {
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_RESET);
switch (trafflight_index) {
case 0:
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_SET);
break;
case 1:
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_SET);
break;
case 2:
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_SET);
break;
case 0:
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_SET);
break;
case 1:
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_SET);
break;
}
trafflight_index = (trafflight_index + 1) % 3;
trafftick_last = trafftick_curr;
HAL_GPIO_TogglePin(R_Prt, R_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay2) {
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay3) {
HAL_GPIO_TogglePin(G_Prt, G_Pin);
if ((trafftick_curr - walktick_last) >= walkSPD) {
HAL_GPIO_TogglePin(W_Prt, W_Pin);
walktick_last = trafftick_curr;
}
}
@@ -0,0 +1,82 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define PedButton_Pin GPIO_PIN_14
#define PedButton_GPIO_Port GPIOA
#define PedButton_EXTI_IRQn EXTI15_10_IRQn
#define White_Pin GPIO_PIN_1
#define White_GPIO_Port GPIOD
#define Red_Pin GPIO_PIN_3
#define Red_GPIO_Port GPIOD
#define Yellow_Pin GPIO_PIN_5
#define Yellow_GPIO_Port GPIOD
#define Green_Pin GPIO_PIN_7
#define Green_GPIO_Port GPIOD
/* USER CODE BEGIN Private defines */
#define Traffic_GPIO_Port GPIOD
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
@@ -1,32 +0,0 @@
/*
* breadboard.c
*
* Created on: Sep 12, 2025
* Author: ja
*/
#include <stdbool.h>
#include "main.h"
void
breadboard(int DELAY_MS)
{
bool Purple = (HAL_GPIO_ReadPin(GPIOD, BTN_PRPL_Pin) == GPIO_PIN_SET); // PD5
bool Grey = (HAL_GPIO_ReadPin(BTN_GREY_GPIO_Port, BTN_GREY_Pin) == GPIO_PIN_SET); // PD7
if (!Purple && !Grey) { // inverted for ease of debug, assignment calls for (Purple && Grey)
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_SET); // PB4
} else {
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET); // PB4
}
HAL_Delay(DELAY_MS); // milliseconds of delay after execution
/*
// Always flash:
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_SET); // PB4 ON
HAL_Delay(DELAY_MS);
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_RESET); // PB4 OFF
HAL_Delay(DELAY_MS);
*/
}
@@ -0,0 +1,419 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include <breadboard.h>
#include "main.h"
#include "cmsis_os.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
CRC_HandleTypeDef hcrc;
DMA2D_HandleTypeDef hdma2d;
TIM_HandleTypeDef htim1;
osThreadId defaultTaskHandle;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_CRC_Init(void);
static void MX_DMA2D_Init(void);
static void MX_TIM1_Init(void);
void StartDefaultTask(void const * argument);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_CRC_Init();
MX_DMA2D_Init();
MX_TIM1_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Create the thread(s) */
/* definition and creation of defaultTask */
osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 4096);
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 8;
RCC_OscInitStruct.PLL.PLLN = 72;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 3;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
/* USER CODE BEGIN CRC_Init 0 */
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
/**
* @brief DMA2D Initialization Function
* @param None
* @retval None
*/
static void MX_DMA2D_Init(void)
{
/* USER CODE BEGIN DMA2D_Init 0 */
/* USER CODE END DMA2D_Init 0 */
/* USER CODE BEGIN DMA2D_Init 1 */
/* USER CODE END DMA2D_Init 1 */
hdma2d.Instance = DMA2D;
hdma2d.Init.Mode = DMA2D_M2M;
hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
hdma2d.Init.OutputOffset = 0;
hdma2d.LayerCfg[1].InputOffset = 0;
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888;
hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
hdma2d.LayerCfg[1].InputAlpha = 0;
if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
{
Error_Handler();
}
if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DMA2D_Init 2 */
/* USER CODE END DMA2D_Init 2 */
}
/**
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
htim1.Init.Prescaler = 0;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 65535;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, White_Pin|Red_Pin|Yellow_Pin|Green_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin : PedButton_Pin */
GPIO_InitStruct.Pin = PedButton_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(PedButton_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : White_Pin Red_Pin Yellow_Pin Green_Pin */
GPIO_InitStruct.Pin = White_Pin|Red_Pin|Yellow_Pin|Green_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 15, 0);
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/* USER CODE BEGIN Header_StartDefaultTask */
/**
* @brief Function implementing the defaultTask thread.
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USER CODE END 5 */
}
/**
* @brief Period elapsed callback in non blocking mode
* @note This function is called when TIM6 interrupt took place, inside
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
* a global variable "uwTick" used as application time base.
* @param htim : TIM handle
* @retval None
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM6)
{
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,13 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void SetTrafficLights(TrafficState s)
{
}
@@ -0,0 +1,9 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "../Inc/breadboad.hpp"
@@ -0,0 +1,418 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
CRC_HandleTypeDef hcrc;
DMA2D_HandleTypeDef hdma2d;
TIM_HandleTypeDef htim1;
osThreadId defaultTaskHandle;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_CRC_Init(void);
static void MX_DMA2D_Init(void);
static void MX_TIM1_Init(void);
void StartDefaultTask(void const * argument);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_CRC_Init();
MX_DMA2D_Init();
MX_TIM1_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Create the thread(s) */
/* definition and creation of defaultTask */
osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 4096);
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 8;
RCC_OscInitStruct.PLL.PLLN = 72;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 3;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
/* USER CODE BEGIN CRC_Init 0 */
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
/**
* @brief DMA2D Initialization Function
* @param None
* @retval None
*/
static void MX_DMA2D_Init(void)
{
/* USER CODE BEGIN DMA2D_Init 0 */
/* USER CODE END DMA2D_Init 0 */
/* USER CODE BEGIN DMA2D_Init 1 */
/* USER CODE END DMA2D_Init 1 */
hdma2d.Instance = DMA2D;
hdma2d.Init.Mode = DMA2D_M2M;
hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
hdma2d.Init.OutputOffset = 0;
hdma2d.LayerCfg[1].InputOffset = 0;
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888;
hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
hdma2d.LayerCfg[1].InputAlpha = 0;
if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
{
Error_Handler();
}
if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DMA2D_Init 2 */
/* USER CODE END DMA2D_Init 2 */
}
/**
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
htim1.Init.Prescaler = 0;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 65535;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, White_Pin|Red_Pin|Yellow_Pin|Green_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin : PedButton_Pin */
GPIO_InitStruct.Pin = PedButton_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(PedButton_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : White_Pin Red_Pin Yellow_Pin Green_Pin */
GPIO_InitStruct.Pin = White_Pin|Red_Pin|Yellow_Pin|Green_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 15, 0);
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/* USER CODE BEGIN Header_StartDefaultTask */
/**
* @brief Function implementing the defaultTask thread.
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USER CODE END 5 */
}
/**
* @brief Period elapsed callback in non blocking mode
* @note This function is called when TIM6 interrupt took place, inside
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
* a global variable "uwTick" used as application time base.
* @param htim : TIM handle
* @retval None
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM6)
{
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,91 @@
/*
* 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
* WalkLight: PE5
*
* Done: Traffic Light
* TODO: Light Dimmer
*/
#include "main.h"
#include "breadboard.h"
#define R_Pin RedLight_Pin
#define Y_Pin YellowLight_Pin
#define G_Pin GreenLight_Pin
#define W_Pin WalkLight_Pin
#define R_Prt RedLight_GPIO_Port
#define Y_Prt YellowLight_GPIO_Port
#define G_Prt GreenLight_GPIO_Port
#define W_Prt WalkLight_GPIO_Port
uint32_t trafftick_last;
uint32_t walktick_last;
uint8_t trafflight_index = 0;
void
starttick(void)
{
trafftick_last = HAL_GetTick();
walktick_last = HAL_GetTick();
}
void
trafflight(int traffSPD, int walkSPD)
{
uint32_t trafftick_curr = HAL_GetTick();
if ((trafftick_curr - trafftick_last) >= traffSPD) {
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_RESET);
switch (trafflight_index) {
case 0:
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_SET);
break;
case 1:
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_SET);
break;
case 2:
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_SET);
break;
case 0:
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_SET);
break;
case 1:
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_SET);
break;
case 2:
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_SET);
}
trafflight_index = (trafflight_index + 1) % 3;
trafftick_last = trafftick_curr;
}
if ((trafftick_curr - walktick_last) >= walkSPD) {
HAL_GPIO_TogglePin(W_Prt, W_Pin);
walktick_last = trafftick_curr;
}
}
@@ -1,32 +0,0 @@
/*
* breadboard.c
*
* Created on: Sep 12, 2025
* Author: ja
*/
#include <stdbool.h>
#include "main.h"
void
breadboard(int DELAY_MS)
{
bool Purple = (HAL_GPIO_ReadPin(GPIOD, BTN_PRPL_Pin) == GPIO_PIN_SET); // PD5
bool Grey = (HAL_GPIO_ReadPin(GPIOD, BTN_GREY_Pin) == GPIO_PIN_SET); // PD7
if (!Purple && !Grey) { // inverted for ease of debug, assignment calls for (Purple && Grey)
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_SET); // PB4
} else {
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET); // PB4
}
HAL_Delay(DELAY_MS); // milliseconds of delay after execution
/*
// Always flash:
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_SET); // PB4 ON
HAL_Delay(DELAY_MS);
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_RESET); // PB4 OFF
HAL_Delay(DELAY_MS);
*/
}
@@ -0,0 +1,13 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void SetTrafficLights(TrafficState s)
{
HAL_GPIO_WritePin(Green_Port)
}
@@ -0,0 +1,15 @@
/*
* breadboard.hpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#ifndef INC_BREADBOARD_HPP_
#define INC_BREADBOARD_HPP_
void breadboard(void);
#endif /* INC_BREADBOARD_HPP_ */
@@ -0,0 +1,15 @@
/*
* breadboard.hpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#ifndef INC_BREADBOARD_HPP_
#define INC_BREADBOARD_HPP_
#endif /* INC_BREADBOARD_HPP_ */
@@ -0,0 +1,15 @@
/*
* breadboard.hpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#ifndef INC_BREADBOARD_H_
#define INC_BREADBOARD_H_
void breadboard(void);
#endif /* INC_BREADBOARD_H_ */
@@ -1,32 +0,0 @@
/*
* breadboard.c
*
* Created on: Sep 12, 2025
* Author: ja
*/
#include <stdbool.h>
#include "main.h"
void
breadboard(int DELAY_MS)
{
bool Purple = (HAL_GPIO_ReadPin(BTN_PRPL_GPIO_Port, BTN_PRPL_Pin) == GPIO_PIN_SET); // PD5
bool Grey = (HAL_GPIO_ReadPin(BTN_GREY_GPIO_Port, BTN_GREY_Pin) == GPIO_PIN_SET); // PD7
if (!Purple && !Grey) { // inverted for ease of debug, assignment calls for (Purple && Grey)
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_SET); // PB4
} else {
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET); // PB4
}
HAL_Delay(DELAY_MS); // milliseconds of delay after execution
/*
// Always flash:
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_SET); // PB4 ON
HAL_Delay(DELAY_MS);
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_RESET); // PB4 OFF
HAL_Delay(DELAY_MS);
*/
}
@@ -0,0 +1,13 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void SetTrafficLights(TrafficState s)
{
HAL_GPIO_WritePin(LED_Port, Green_Pin, GPIO_PIN_RESET);
}
@@ -0,0 +1,9 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
@@ -0,0 +1,13 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void breadboard(void)
{
}
@@ -0,0 +1,9 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboad.hpp"
@@ -0,0 +1,80 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define PedButton_Pin GPIO_PIN_14
#define PedButton_GPIO_Port GPIOA
#define PedButton_EXTI_IRQn EXTI15_10_IRQn
#define White_Pin GPIO_PIN_1
#define White_GPIO_Port GPIOD
#define Red_Pin GPIO_PIN_3
#define Red_GPIO_Port GPIOD
#define Yellow_Pin GPIO_PIN_5
#define Yellow_GPIO_Port GPIOD
#define Green_Pin GPIO_PIN_7
#define Green_GPIO_Port GPIOD
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
@@ -0,0 +1,15 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void SetTrafficLights(TrafficState s)
{
HAL_GPIO_WritePin(LED_Port, Green_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(LED_Port, Yellow_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(LED_Port, Red_Pin, GPIO_PIN_RESET);
}
@@ -1,83 +0,0 @@
/*
* 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
* WalkLight: PE5
*
* Done: Traffic Light
* TODO: async? Walk Signal, Light Dimmer
*/
#include "main.h"
#include "breadboard.h"
#define R_Pin RedLight_Pin
#define Y_Pin YellowLight_Pin
#define G_Pin GreenLight_Pin
#define W_Pin WalkLight_Pin
#define R_Prt RedLight_GPIO_Port
#define Y_Prt YellowLight_GPIO_Port
#define G_Prt GreenLight_GPIO_Port
#define W_Prt WalkLight_GPIO_Port
uint32_t redlight_last;
uint32_t ylwlight_last;
uint32_t grnlight_last;
void
starttick(void)
{
trafftick_last = HAL_GetTick();
}
void
trafflight(int 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);
*/
uint32_t trafftick_curr = HAL_GetTick();
int ldelay2 = traffSPD * 2;
int ldelay3 = traffSPD * 3;
if ((trafftick_curr - trafftick_last) >= traffSPD) {
trafftick_last = trafftick_curr;
HAL_GPIO_TogglePin(R_Prt, R_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay2) {
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay3) {
HAL_GPIO_TogglePin(G_Prt, G_Pin);
}
}
@@ -0,0 +1,15 @@
/*
* breadboard.hpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#ifndef INC_BREADBOARD_HPP_
#define INC_BREADBOARD_HPP_
#endif /* INC_BREADBOARD_HPP_ */
@@ -0,0 +1,375 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
CRC_HandleTypeDef hcrc;
DMA2D_HandleTypeDef hdma2d;
TIM_HandleTypeDef htim1;
osThreadId defaultTaskHandle;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_CRC_Init(void);
static void MX_DMA2D_Init(void);
static void MX_TIM1_Init(void);
void StartDefaultTask(void const * argument);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_CRC_Init();
MX_DMA2D_Init();
MX_TIM1_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Create the thread(s) */
/* definition and creation of defaultTask */
..osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 4096);
//defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
//osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 8;
RCC_OscInitStruct.PLL.PLLN = 72;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 3;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
/* USER CODE BEGIN CRC_Init 0 */
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
/**
* @brief DMA2D Initialization Function
* @param None
* @retval None
*/
static void MX_DMA2D_Init(void)
{
/* USER CODE BEGIN DMA2D_Init 0 */
/* USER CODE END DMA2D_Init 0 */
/* USER CODE BEGIN DMA2D_Init 1 */
/* USER CODE END DMA2D_Init 1 */
hdma2d.Instance = DMA2D;
hdma2d.Init.Mode = DMA2D_M2M;
hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
hdma2d.Init.OutputOffset = 0;
hdma2d.LayerCfg[1].InputOffset = 0;
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888;
hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
hdma2d.LayerCfg[1].InputAlpha = 0;
if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
{
Error_Handler();
}
if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DMA2D_Init 2 */
/* USER CODE END DMA2D_Init 2 */
}
/**
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
htim1.Init.Prescaler = 0;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 65535;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/* USER CODE BEGIN Header_StartDefaultTask */
/**
* @brief Function implementing the defaultTask thread.
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USER CODE END 5 */
}
/**
* @brief Period elapsed callback in non blocking mode
* @note This function is called when TIM6 interrupt took place, inside
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
* a global variable "uwTick" used as application time base.
* @param htim : TIM handle
* @retval None
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM6)
{
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,375 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
CRC_HandleTypeDef hcrc;
DMA2D_HandleTypeDef hdma2d;
TIM_HandleTypeDef htim1;
osThreadId defaultTaskHandle;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_CRC_Init(void);
static void MX_DMA2D_Init(void);
static void MX_TIM1_Init(void);
void StartDefaultTask(void const * argument);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_CRC_Init();
MX_DMA2D_Init();
MX_TIM1_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Create the thread(s) */
/* definition and creation of defaultTask */
osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 4096);
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 8;
RCC_OscInitStruct.PLL.PLLN = 72;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 3;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
/* USER CODE BEGIN CRC_Init 0 */
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
/**
* @brief DMA2D Initialization Function
* @param None
* @retval None
*/
static void MX_DMA2D_Init(void)
{
/* USER CODE BEGIN DMA2D_Init 0 */
/* USER CODE END DMA2D_Init 0 */
/* USER CODE BEGIN DMA2D_Init 1 */
/* USER CODE END DMA2D_Init 1 */
hdma2d.Instance = DMA2D;
hdma2d.Init.Mode = DMA2D_M2M;
hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
hdma2d.Init.OutputOffset = 0;
hdma2d.LayerCfg[1].InputOffset = 0;
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888;
hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
hdma2d.LayerCfg[1].InputAlpha = 0;
if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
{
Error_Handler();
}
if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DMA2D_Init 2 */
/* USER CODE END DMA2D_Init 2 */
}
/**
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
htim1.Init.Prescaler = 0;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 65535;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/* USER CODE BEGIN Header_StartDefaultTask */
/**
* @brief Function implementing the defaultTask thread.
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USER CODE END 5 */
}
/**
* @brief Period elapsed callback in non blocking mode
* @note This function is called when TIM6 interrupt took place, inside
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
* a global variable "uwTick" used as application time base.
* @param htim : TIM handle
* @retval None
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM6)
{
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,3 @@
635E684B79701B039C64EA45C3F84D30=76D5CABA7E36F5DD0D38ED323FA426B4
DC22A860405A8BF2F2C095E5B6529F12=BB3BD6F58A87E81DE6E549B37335B23A
eclipse.preferences.version=1
@@ -0,0 +1,8 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboad.h"
@@ -21,7 +21,7 @@
* WalkLight: PE5
*
* Done: Traffic Light
* TODO: async? Walk Signal, Light Dimmer
* TODO: Light Dimmer
*/
#include "main.h"
@@ -38,42 +38,45 @@
#define W_Prt WalkLight_GPIO_Port
uint32_t trafftick_last;
uint32_t walktick_last;
uint8_t trafflight_index = 0;
void
starttick(void)
{
trafftick_last = HAL_GetTick();
walktick_last = HAL_GetTick();
}
void
trafflight(int traffSPD)
trafflight(int traffSPD, int walkSPD)
{
/*
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);
*/
uint32_t trafftick_curr = HAL_GetTick();
if ((trafftick_curr - trafftick_last) >= traffSPD) {
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_RESET);
switch (trafflight_index) {
case 0:
HAL_GPIO_WritePin(R_Prt, R_Pin, GPIO_PIN_SET);
break;
case 1:
HAL_GPIO_WritePin(Y_Prt, Y_Pin, GPIO_PIN_SET);
break;
case 2:
HAL_GPIO_WritePin(G_Prt, G_Pin, GPIO_PIN_SET);
break;
}
trafflight_index = (trafflight_index + 1) % 3;
trafftick_last = trafftick_curr;
HAL_GPIO_TogglePin(R_Prt, R_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay2) {
HAL_GPIO_TogglePin(Y_Prt, Y_Pin);
}
if ((trafftick_curr - trafftick_last) >= ldelay3) {
HAL_GPIO_TogglePin(G_Prt, G_Pin);
if ((trafftick_curr - walktick_last) >= walkSPD) {
HAL_GPIO_TogglePin(W_Prt, W_Pin);
walktick_last = trafftick_curr;
}
}
@@ -0,0 +1,83 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define PedButton_Pin GPIO_PIN_14
#define PedButton_GPIO_Port GPIOA
#define PedButton_EXTI_IRQn EXTI15_10_IRQn
#define White_Pin GPIO_PIN_1
#define White_GPIO_Port GPIOD
#define Red_Pin GPIO_PIN_3
#define Red_GPIO_Port GPIOD
#define Yellow_Pin GPIO_PIN_5
#define Yellow_GPIO_Port GPIOD
#define Green_Pin GPIO_PIN_7
#define Green_GPIO_Port GPIOD
/* USER CODE BEGIN Private defines */
#define Traffic_Port GPIOD
#define PedButton_Port
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
@@ -0,0 +1,83 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define PedButton_Pin GPIO_PIN_14
#define PedButton_GPIO_Port GPIOA
#define PedButton_EXTI_IRQn EXTI15_10_IRQn
#define White_Pin GPIO_PIN_1
#define White_GPIO_Port GPIOD
#define Red_Pin GPIO_PIN_3
#define Red_GPIO_Port GPIOD
#define Yellow_Pin GPIO_PIN_5
#define Yellow_GPIO_Port GPIOD
#define Green_Pin GPIO_PIN_7
#define Green_GPIO_Port GPIOD
/* USER CODE BEGIN Private defines */
#define Traffic_Port GPIOD
#define PedButton_Port GPIOD
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
@@ -0,0 +1,13 @@
/*
* breadboard.cpp
*
* Created on: Sep 22, 2025
* Author: ja
*/
#include "breadboard.h"
void SetTrafficLights(TrafficState s)
{
HAL_GPIO_WritePin(Green_Port);
}
@@ -0,0 +1,16 @@
eclipse.preferences.version=1
indexer/indexAllFiles=true
indexer/indexAllHeaderVersions=false
indexer/indexImportLocation=.settings/cdt-index.zip
indexer/indexOnOpen=false
indexer/indexUnusedHeadersWithAlternateLang=false
indexer/indexUnusedHeadersWithDefaultLang=true
indexer/indexerId=org.eclipse.cdt.core.fastIndexer
indexer/preferenceScope=1
indexer/skipFilesLargerThanMB=8
indexer/skipImplicitReferences=false
indexer/skipIncludedFilesLargerThanMB=16
indexer/skipMacroReferences=false
indexer/skipReferences=false
indexer/skipTypeReferences=false
indexer/useHeuristicIncludeResolution=true
@@ -7,3 +7,5 @@ properties/MyNewProject.null.83337167/com.st.stm32cube.ide.mcu.gnu.managedbuild.
properties/MyNewProject.null.83337167/com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1285969537=com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.144819249\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.379559059\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.2036727211\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.980685916\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1426522156\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1237423215\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1282775561\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1912732982\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1219327809\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.899390694\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1885585371\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1401195929\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.337205154\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.167142367\=rebuildState\\\=true\\n\n
properties/TrafficLightsPlus.null.1047040538/com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.551871681=com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.551871681\=rcState\\\=0\\nrebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.138235671\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1872140206\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1477351937\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1725620854\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1637256854\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.835115412\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1553682423\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.229572010\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.7720070\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1699159996\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1811087539\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1471646069\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.43084128\=rebuildState\\\=false\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.2144803112\=rebuildState\\\=false\\n\n
properties/TrafficLightsPlus.null.1047040538/com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1862556084=com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1925537181\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1243695734\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.2098225013\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.256261605\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.34078085\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1175117447\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.659878081\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.645101001\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1300569852\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.770967083\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1618010879\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.529451660\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.353087469\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.411830067\=rebuildState\\\=true\\n\n
properties/TrafficLightsPlusPlus.null.166290000/com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1445703066=com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1445703066\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.417290083\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1169038626\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1982492857\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.608660531\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.975152869\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.2101279197\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.2068495425\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1798514912\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.2075628922\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.580493968\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1133793974\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1157387618\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.1903197450\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.130463048\=rebuildState\\\=true\\n\n
properties/TrafficLightsPlusPlus.null.166290000/com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1430849248=com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1448864625\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.331577059\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.179178595\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.543420534\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.358312420\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1142953222\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.862510013\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.712074520\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.961692441\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1862849083\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.468550049\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.20346972\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.334079194\=rebuildState\\\=true\\n\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.1661529107\=rebuildState\\\=true\\n\n
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ASCII"?>
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_v0ahAJZcEfCW4u5hSeoEQw" elementId="org.eclipse.e4.legacy.ide.application" contributorURI="platform:/plugin/org.eclipse.ui.workbench" selectedElement="_v0ahAZZcEfCW4u5hSeoEQw" bindingContexts="_v0bvRJZcEfCW4u5hSeoEQw">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;workbench>&#xA;&lt;mruList>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.c&quot; tooltip=&quot;TrafficLightsPlus/Core/Src/breadboard.c&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Src/breadboard.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.h&quot; tooltip=&quot;TrafficLightsPlus/Core/Inc/breadboard.h&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Inc/breadboard.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; tooltip=&quot;TrafficLightsPlus/Core/Src/main.c&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Src/main.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;com.st.stm32cube.common.mx.startCubeMx&quot; name=&quot;TrafficLightsPlus.ioc&quot; tooltip=&quot;TrafficLightsPlus/TrafficLightsPlus.ioc&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/TrafficLightsPlus.ioc&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.h&quot; tooltip=&quot;TrafficLightsPlus/Core/Inc/main.h&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Inc/main.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;stm32f4xx_hal_gpio.h&quot; tooltip=&quot;TrafficLightsPlus/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; tooltip=&quot;MyNewProject/Core/Src/main.c&quot;>&#xA;&lt;persistable path=&quot;/MyNewProject/Core/Src/main.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.c&quot; tooltip=&quot;Calc2/Core/Src/breadboard.c&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Core/Src/breadboard.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; tooltip=&quot;Calc2/Core/Src/main.c&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Core/Src/main.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;com.st.stm32cube.common.mx.startCubeMx&quot; name=&quot;Calc2.ioc&quot; tooltip=&quot;Calc2/Calc2.ioc&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Calc2.ioc&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.h&quot; tooltip=&quot;Calc2/Core/Inc/main.h&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Core/Inc/main.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;stm32f4xx_hal.h&quot; tooltip=&quot;Calc2/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;stm32f4xx_hal.c&quot; tooltip=&quot;Calc2/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;userloop.c&quot; tooltip=&quot;Calculator/Core/Src/userloop.c&quot;>&#xA;&lt;persistable path=&quot;/Calculator/Core/Src/userloop.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.ide.FileStoreEditorInputFactory&quot; id=&quot;com.st.stm32cube.common.mx.startCubeMx&quot; name=&quot;Calc2.ioc&quot; tooltip=&quot;/home/ja/Desktop/UTMProject/Calc2/Calc2.ioc&quot;>&#xA;&lt;persistable uri=&quot;file:/home/ja/Desktop/UTMProject/Calc2/Calc2.ioc&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;com.st.stm32cube.common.mx.startCubeMx&quot; name=&quot;Calculator.ioc&quot; tooltip=&quot;Calculator/Calculator.ioc&quot;>&#xA;&lt;persistable path=Line truncated
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;workbench>&#xA;&lt;mruList>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.cpp&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Src/breadboard.cpp&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlusPlus/Core/Src/breadboard.cpp&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.h&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Inc/main.h&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlusPlus/Core/Inc/main.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.hpp&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Inc/breadboard.hpp&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlusPlus/Core/Inc/breadboard.hpp&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Src/main.c&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlusPlus/Core/Src/main.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;com.st.stm32cube.common.mx.startCubeMx&quot; name=&quot;TrafficLightsPlusPlus.ioc&quot; tooltip=&quot;TrafficLightsPlusPlus/TrafficLightsPlusPlus.ioc&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlusPlus/TrafficLightsPlusPlus.ioc&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.c&quot; tooltip=&quot;TrafficLightsPlus/Core/Src/breadboard.c&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Src/breadboard.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.h&quot; tooltip=&quot;TrafficLightsPlus/Core/Inc/breadboard.h&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Inc/breadboard.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; tooltip=&quot;TrafficLightsPlus/Core/Src/main.c&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Src/main.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;com.st.stm32cube.common.mx.startCubeMx&quot; name=&quot;TrafficLightsPlus.ioc&quot; tooltip=&quot;TrafficLightsPlus/TrafficLightsPlus.ioc&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/TrafficLightsPlus.ioc&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.h&quot; tooltip=&quot;TrafficLightsPlus/Core/Inc/main.h&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Core/Inc/main.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;stm32f4xx_hal_gpio.h&quot; tooltip=&quot;TrafficLightsPlus/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h&quot;>&#xA;&lt;persistable path=&quot;/TrafficLightsPlus/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; tooltip=&quot;MyNewProject/Core/Src/main.c&quot;>&#xA;&lt;persistable path=&quot;/MyNewProject/Core/Src/main.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.c&quot; tooltip=&quot;Calc2/Core/Src/breadboard.c&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Core/Src/breadboard.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; tooltip=&quot;Calc2/Core/Src/main.c&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Core/Src/main.c&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;com.st.stm32cube.common.mx.startCubeMx&quot; name=&quot;Calc2.ioc&quot; tooltip=&quot;Calc2/Calc2.ioc&quot;>&#xA;&lt;persistable path=&quot;/Calc2/Calc2.ioc&quot;/>&#xA;&lt;/file>&#xA;&lt;file factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.h&quot; tooltip=&quot;Calc2/Core/Inc/main.h&quot;>&#xA;&lt;persistable pLine truncated
<tags>activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration</tags>
<children xsi:type="basic:TrimmedWindow" xmi:id="_v0ahAZZcEfCW4u5hSeoEQw" elementId="IDEWindow" contributorURI="platform:/plugin/org.eclipse.ui.workbench" selectedElement="_v0ahApZcEfCW4u5hSeoEQw" x="10" y="32" width="950" height="1063">
<persistedState key="coolBarVisible" value="true"/>
@@ -220,27 +220,33 @@
<tags>categoryTag:Help</tags>
</sharedElements>
<sharedElements xsi:type="advanced:Area" xmi:id="_v0ajFZZcEfCW4u5hSeoEQw" elementId="org.eclipse.ui.editorss" selectedElement="_v0ajFpZcEfCW4u5hSeoEQw">
<children xsi:type="basic:PartStack" xmi:id="_v0ajFpZcEfCW4u5hSeoEQw" elementId="org.eclipse.e4.primaryDataStack" selectedElement="_v0ajF5ZcEfCW4u5hSeoEQw">
<children xsi:type="basic:PartStack" xmi:id="_v0ajFpZcEfCW4u5hSeoEQw" elementId="org.eclipse.e4.primaryDataStack" selectedElement="_r-pIMJfvEfCEMJeo1pqC4A">
<tags>EditorStack</tags>
<tags>org.eclipse.e4.primaryDataStack</tags>
<tags>active</tags>
<tags>noFocus</tags>
<children xsi:type="basic:Part" xmi:id="_v0ajF5ZcEfCW4u5hSeoEQw" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="breadboard.c" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/obj16/c_file_obj.gif" closeable="true">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.c&quot; partName=&quot;breadboard.c&quot; title=&quot;breadboard.c&quot; tooltip=&quot;TrafficLightsPlus/Core/Src/breadboard.c&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/TrafficLightsPlus/Core/Src/breadboard.c&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;1662&quot; selectionTopPixel=&quot;748&quot;/>&#xA;&lt;/editor>"/>
<children xsi:type="basic:Part" xmi:id="_ajC0AJfvEfCEMJeo1pqC4A" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="main.c" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/obj16/c_file_obj.gif" closeable="true">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; partName=&quot;main.c&quot; title=&quot;main.c&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Src/main.c&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/TrafficLightsPlusPlus/Core/Src/main.c&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;10582&quot; selectionTopPixel=&quot;0&quot;/>&#xA;&lt;/editor>"/>
<tags>Editor</tags>
<tags>removeOnHide</tags>
<tags>org.eclipse.cdt.ui.editor.CEditor</tags>
</children>
<children xsi:type="basic:Part" xmi:id="_fJ5qYJfvEfCEMJeo1pqC4A" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="breadboard.h" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/obj16/c_file_obj.gif" closeable="true">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.h&quot; partName=&quot;breadboard.h&quot; title=&quot;breadboard.h&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Inc/breadboard.h&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/TrafficLightsPlusPlus/Core/Inc/breadboard.h&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;169&quot; selectionTopPixel=&quot;0&quot;/>&#xA;&lt;/editor>"/>
<tags>Editor</tags>
<tags>removeOnHide</tags>
<tags>org.eclipse.cdt.ui.editor.CEditor</tags>
</children>
<children xsi:type="basic:Part" xmi:id="_r-pIMJfvEfCEMJeo1pqC4A" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="breadboard.cpp" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/obj16/c_file_obj.gif" closeable="true">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.cpp&quot; partName=&quot;breadboard.cpp&quot; title=&quot;breadboard.cpp&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Src/breadboard.cpp&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/TrafficLightsPlusPlus/Core/Src/breadboard.cpp&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;354&quot; selectionTopPixel=&quot;0&quot;/>&#xA;&lt;/editor>"/>
<tags>Editor</tags>
<tags>removeOnHide</tags>
<tags>org.eclipse.cdt.ui.editor.CEditor</tags>
<tags>active</tags>
<tags>activeOnClose</tags>
</children>
<children xsi:type="basic:Part" xmi:id="_OVYfcJaeEfCANYuicysrhA" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="main.c" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/obj16/c_file_obj.gif" closeable="true">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.c&quot; partName=&quot;main.c&quot; title=&quot;main.c&quot; tooltip=&quot;TrafficLightsPlus/Core/Src/main.c&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/TrafficLightsPlus/Core/Src/main.c&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;4233&quot; selectionTopPixel=&quot;2638&quot;/>&#xA;&lt;/editor>"/>
<tags>Editor</tags>
<tags>removeOnHide</tags>
<tags>org.eclipse.cdt.ui.editor.CEditor</tags>
</children>
<children xsi:type="basic:Part" xmi:id="_P9nBgJaeEfCANYuicysrhA" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="breadboard.h" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/obj16/c_file_obj.gif" closeable="true">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;breadboard.h&quot; partName=&quot;breadboard.h&quot; title=&quot;breadboard.h&quot; tooltip=&quot;TrafficLightsPlus/Core/Inc/breadboard.h&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/TrafficLightsPlus/Core/Inc/breadboard.h&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;175&quot; selectionTopPixel=&quot;0&quot;/>&#xA;&lt;/editor>"/>
<children xsi:type="basic:Part" xmi:id="_y35fAJfvEfCEMJeo1pqC4A" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="main.h" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/obj16/c_file_obj.gif" closeable="true">
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.cdt.ui.editor.CEditor&quot; name=&quot;main.h&quot; partName=&quot;main.h&quot; title=&quot;main.h&quot; tooltip=&quot;TrafficLightsPlusPlus/Core/Inc/main.h&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/TrafficLightsPlusPlus/Core/Inc/main.h&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;2286&quot; selectionTopPixel=&quot;684&quot;/>&#xA;&lt;/editor>"/>
<tags>Editor</tags>
<tags>removeOnHide</tags>
<tags>org.eclipse.cdt.ui.editor.CEditor</tags>
@@ -274,7 +280,7 @@
<sharedElements xsi:type="basic:Part" xmi:id="_v0bIXZZcEfCW4u5hSeoEQw" elementId="org.eclipse.ui.views.ProblemView" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView" label="Problems" iconURI="platform:/plugin/org.eclipse.ui.ide/icons/full/eview16/problems_view.png" tooltip="" closeable="true">
<persistedState key="originalCompatibilityViewClass" value="org.eclipse.ui.internal.views.markers.ProblemsView"/>
<persistedState key="originalCompatibilityViewBundle" value="org.eclipse.ui.ide"/>
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;view PRIMARY_SORT_FIELD=&quot;org.eclipse.ui.ide.severityAndDescriptionField&quot; categoryGroup=&quot;org.eclipse.ui.ide.severity&quot; markerContentGenerator=&quot;org.eclipse.ui.ide.problemsGenerator&quot;>&#xA;&lt;expanded>&#xA;&lt;category IMemento.internal.id=&quot;Errors&quot;/>&#xA;&lt;category IMemento.internal.id=&quot;Warnings&quot;/>&#xA;&lt;category IMemento.internal.id=&quot;Infos&quot;/>&#xA;&lt;/expanded>&#xA;&lt;columnWidths org.eclipse.ui.ide.locationField=&quot;105&quot; org.eclipse.ui.ide.markerType=&quot;105&quot; org.eclipse.ui.ide.pathField=&quot;140&quot; org.eclipse.ui.ide.resourceField=&quot;105&quot; org.eclipse.ui.ide.severityAndDescriptionField=&quot;350&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.severityAndDescriptionField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.resourceField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.pathField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.locationField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.markerType&quot;/>&#xA;&lt;/view>"/>
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;view PRIMARY_SORT_FIELD=&quot;org.eclipse.ui.ide.severityAndDescriptionField&quot; categoryGroup=&quot;org.eclipse.ui.ide.severity&quot; markerContentGenerator=&quot;org.eclipse.ui.ide.problemsGenerator&quot;>&#xA;&lt;columnWidths org.eclipse.ui.ide.locationField=&quot;105&quot; org.eclipse.ui.ide.markerType=&quot;105&quot; org.eclipse.ui.ide.pathField=&quot;140&quot; org.eclipse.ui.ide.resourceField=&quot;105&quot; org.eclipse.ui.ide.severityAndDescriptionField=&quot;350&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.severityAndDescriptionField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.resourceField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.pathField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.locationField&quot;/>&#xA;&lt;visible IMemento.internal.id=&quot;org.eclipse.ui.ide.markerType&quot;/>&#xA;&lt;/view>"/>
<tags>View</tags>
<tags>categoryTag:General</tags>
<menus xmi:id="_v0bIXpZcEfCW4u5hSeoEQw" elementId="org.eclipse.ui.views.ProblemView">
@@ -398,7 +404,7 @@
</children>
<children xsi:type="menu:ToolBar" xmi:id="_v0bI2ZZcEfCW4u5hSeoEQw" elementId="org.eclipse.ui.workbench.file">
<tags>Draggable</tags>
<children xsi:type="menu:HandledToolItem" xmi:id="_5l64sJabEfCANYuicysrhA" elementId="print" visible="false" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/print_edit.png" tooltip="Print" command="_v0cY6pZcEfCW4u5hSeoEQw"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_8gfYoJfpEfCEMJeo1pqC4A" elementId="print" visible="false" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/print_edit.png" tooltip="Print" command="_v0cY6pZcEfCW4u5hSeoEQw"/>
</children>
<children xsi:type="menu:ToolBar" xmi:id="_v0bI6ZZcEfCW4u5hSeoEQw" elementId="group.edit" toBeRendered="false">
<tags>toolbarSeparator</tags>
@@ -406,8 +412,8 @@
</children>
<children xsi:type="menu:ToolBar" xmi:id="_v0bI65ZcEfCW4u5hSeoEQw" elementId="org.eclipse.ui.workbench.edit">
<tags>Draggable</tags>
<children xsi:type="menu:HandledToolItem" xmi:id="_5l8G0JabEfCANYuicysrhA" elementId="undo" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/undo_edit.png" tooltip="Undo" enabled="false" command="_v0cY2JZcEfCW4u5hSeoEQw"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_5l8t4JabEfCANYuicysrhA" elementId="redo" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/redo_edit.png" tooltip="Redo" enabled="false" command="_v0cZfJZcEfCW4u5hSeoEQw"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_8ggmwJfpEfCEMJeo1pqC4A" elementId="undo" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/undo_edit.png" tooltip="Undo" command="_v0cY2JZcEfCW4u5hSeoEQw"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_8ggmwZfpEfCEMJeo1pqC4A" elementId="redo" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/redo_edit.png" tooltip="Redo" enabled="false" command="_v0cZfJZcEfCW4u5hSeoEQw"/>
</children>
<children xsi:type="menu:ToolBar" xmi:id="_v0bI85ZcEfCW4u5hSeoEQw" elementId="additions" toBeRendered="false">
<tags>toolbarSeparator</tags>
@@ -431,7 +437,7 @@
</children>
<children xsi:type="menu:ToolBar" xmi:id="_v0bJMZZcEfCW4u5hSeoEQw" elementId="org.eclipse.ui.workbench.navigate">
<tags>Draggable</tags>
<children xsi:type="menu:HandledToolItem" xmi:id="_5mAYQJabEfCANYuicysrhA" elementId="org.eclipse.ui.window.pinEditor" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/pin_editor.png" tooltip="Pin Editor" type="Check" command="_v0cYjpZcEfCW4u5hSeoEQw"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_8gh04JfpEfCEMJeo1pqC4A" elementId="org.eclipse.ui.window.pinEditor" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/pin_editor.png" tooltip="Pin Editor" type="Check" command="_v0cYjpZcEfCW4u5hSeoEQw"/>
</children>
<children xsi:type="menu:ToolBar" xmi:id="_v0bJP5ZcEfCW4u5hSeoEQw" elementId="group.editor" toBeRendered="false">
<tags>toolbarSeparator</tags>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<session version="1.0">
<refactoring comment="Rename resource &apos;TrafficLightsPlusPlus/Core/Inc/breadboard.hpp&apos; to &apos;breadboard.h&apos;" description="Rename resource &apos;breadboard.hpp&apos;" flags="7" id="org.eclipse.ltk.core.refactoring.rename.resource" input="Core/Inc/breadboard.hpp" name="breadboard.h" stamp="1758571627730" updateReferences="true"/>
</session>
@@ -0,0 +1 @@
1758571627730 Rename resource 'breadboard.hpp'
@@ -3,6 +3,9 @@
<item key="hasShownOverlayPopupBefore" value="true"/>
<item key="replaceBarOpen" value="false"/>
<list key="searchhistory">
<item value="void systemclock_config"/>
<item value="MX_GPIO_Init"/>
<item value="MX_GPIO"/>
<item value="LED_EXT"/>
<item value="include"/>
<item value="EXT"/>
@@ -15,8 +18,5 @@
<item value="osthread"/>
<item value="while (1"/>
<item value="while"/>
<item value="B1_Pin"/>
<item value="osThreadDef"/>
<item value="osThreadId"/>
</list>
</section>