Skip to content

Commit abd28d3

Browse files
Deomid Ryabkovcesantabot
authored andcommitted
Make FreeRTOS a library, upgrade to 10.2.0
All the platforms except esp32 (which uses heavily patched 9.0 from IDF) and esp8266 (doesn't use RTOS at all) are using the same version of FreeRTOS now. CL: Make FreeRTOS a library, upgrade to 10.2.0 PUBLISHED_FROM=a4f7949a9f1546d23fc183412445859830f02d1a
1 parent 45bbcfe commit abd28d3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/stm32/stm32_eth_netif.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static void stm32_eth_netif_task(void const *argument) {
441441
(struct stm32_eth_netif_state *) netif->state;
442442

443443
for (;;) {
444-
if (osSemaphoreWait(state->sem_id, TIME_WAITING_FOR_INPUT) == osOK) {
444+
if (osSemaphoreAcquire(state->sem_id, TIME_WAITING_FOR_INPUT) == osOK) {
445445
do {
446446
p = low_level_input(netif);
447447
if (p != NULL) {
@@ -540,9 +540,12 @@ err_t stm32_eth_netif_init(struct netif *netif) {
540540
netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP;
541541

542542
/* create the task that handles the ETH_MAC */
543-
osThreadDef(EthIf, stm32_eth_netif_task, osPriorityRealtime, 0,
544-
INTERFACE_THREAD_STACK_SIZE);
545-
osThreadCreate(osThread(EthIf), netif);
543+
const osThreadAttr_t attr = {
544+
.name = "EthIf",
545+
.priority = osPriorityRealtime,
546+
.stack_size = INTERFACE_THREAD_STACK_SIZE,
547+
};
548+
osThreadNew((osThreadFunc_t) stm32_eth_netif_task, netif, &attr);
546549

547550
stm32_set_int_handler(ETH_IRQn, stm32_eth_int_handler);
548551
HAL_NVIC_SetPriority(ETH_IRQn, 9, 0);

0 commit comments

Comments
 (0)