Modified config.hpp + enabled UART + added startUpExtras

This commit is contained in:
dario
2023-08-30 22:14:39 +02:00
parent 7c46e30161
commit d7d80c2288
7 changed files with 77 additions and 11 deletions

View File

@@ -29,6 +29,7 @@
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
typedef StaticSemaphore_t osStaticMutexDef_t;
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
@@ -54,6 +55,14 @@ const osThreadAttr_t defaultTask_attributes = {
.stack_size = 128 * 4,
.priority = (osPriority_t) osPriorityNormal,
};
/* Definitions for uartMutex */
osMutexId_t uartMutexHandle;
osStaticMutexDef_t uartMutex_cb;
const osMutexAttr_t uartMutex_attributes = {
.name = "uartMutex",
.cb_mem = &uartMutex_cb,
.cb_size = sizeof(uartMutex_cb),
};
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN FunctionPrototypes */
@@ -85,6 +94,9 @@ void MX_FREERTOS_Init(void) {
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Create the mutex(es) */
/* creation of uartMutex */
uartMutexHandle = osMutexNew(&uartMutex_attributes);
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
@@ -126,10 +138,6 @@ void MX_FREERTOS_Init(void) {
void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN StartDefaultTask */
#define STA_RTOS_SYSTEM_EVENTS_ENABLE
#define STA_RTOS_WATCHDOG_ENABLE
extern void startALPAKA(void *);
startALPAKA(argument);