firmware
IEM Firmware Documentation
Loading...
Searching...
No Matches
stm32_lock_user.h File Reference

User defined lock mechanisms. More...

#include "FreeRTOS.h"
#include "task.h"
Include dependency graph for stm32_lock_user.h:

Go to the source code of this file.

Data Structures

struct  LockingData_t

Macros

#define MAX_LOCK_NESTING_LEVEL   4
#define LOCK_ASSERT(x)
#define LOCKING_DATA_INIT

Functions

static void stm32_lock_init (LockingData_t *lock)
 Initialize STM32 lock.
static void stm32_lock_acquire (LockingData_t *lock)
 Acquire STM32 lock.
static void stm32_lock_release (LockingData_t *lock)
 Release STM32 lock.

Detailed Description

User defined lock mechanisms.

Author
STMicroelectronics
Attention

Copyright (c) 2024 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.

Macro Definition Documentation

◆ LOCK_ASSERT

#define LOCK_ASSERT ( x)
Value:
do { \
if (!(x)) { \
__disable_irq(); \
for (;;); \
} \
} while (0)

◆ LOCKING_DATA_INIT

#define LOCKING_DATA_INIT
Value:
{ \
{ 0, 0, 0, 0 }, \
0, \
}

Initialize members in instance of LockingData_t structure

◆ MAX_LOCK_NESTING_LEVEL

#define MAX_LOCK_NESTING_LEVEL   4

Function Documentation

◆ stm32_lock_acquire()

void stm32_lock_acquire ( LockingData_t * lock)
inlinestatic

Acquire STM32 lock.

Parameters
lockThe lock to acquire
Here is the caller graph for this function:

◆ stm32_lock_init()

void stm32_lock_init ( LockingData_t * lock)
inlinestatic

Initialize STM32 lock.

Parameters
lockThe lock to init

◆ stm32_lock_release()

void stm32_lock_release ( LockingData_t * lock)
inlinestatic

Release STM32 lock.

Parameters
lockThe lock to release
Here is the caller graph for this function: