Added uartmutex to README

This commit is contained in:
carlwachter 2023-12-21 13:50:23 +00:00
parent 10204f67cb
commit 7ebc2e5d1e

View File

@ -28,6 +28,24 @@ void StartDefaultTask(void *argument)
}
```
Ebenfalls müssen noch diese Ergänzungen in `Core/Src/freertos.c` vorgenommen werden:
```
/* 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),
};
void MX_FREERTOS_Init(void) {
uartMutexHandle = osMutexNew(&uartMutex_attributes);
//...
}
```
## Configuring TACOS
Be sure to add a "config.hpp" to the App/Inc/sta directory. This file could look like this:
```
@ -63,4 +81,10 @@ Be sure to add a "config.hpp" to the App/Inc/sta directory. This file could look
#define STA_TACOS_INITIAL_STATE 0
#endif /* INC_STA_CONFIG_HPP_ */
```
PS: For not officially supported chips use this as the include:
```
#include <sta/devices/stm32/mcu/common.hpp>
#define STA_MCU_LITTLE_ENDIAN
#define STA_PLATFORM_STM32
```