You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

886 lines
33 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32h7xx_ll_hsem.h
  4. * @author MCD Application Team
  5. * @brief Header file of HSEM LL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef STM32H7xx_LL_HSEM_H
  21. #define STM32H7xx_LL_HSEM_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32h7xx.h"
  27. /** @addtogroup STM32H7xx_LL_Driver
  28. * @{
  29. */
  30. #if defined(HSEM)
  31. /** @defgroup HSEM_LL HSEM
  32. * @{
  33. */
  34. /* Private types -------------------------------------------------------------*/
  35. /* Private variables ---------------------------------------------------------*/
  36. /* Private constants ---------------------------------------------------------*/
  37. /* Private macros ------------------------------------------------------------*/
  38. /* Exported types ------------------------------------------------------------*/
  39. /* Exported constants --------------------------------------------------------*/
  40. /** @defgroup HSEM_LL_Exported_Constants HSEM Exported Constants
  41. * @{
  42. */
  43. /** @defgroup HSEM_LL_EC_COREID COREID Defines
  44. * @{
  45. */
  46. #define LL_HSEM_COREID_NONE 0U
  47. #define LL_HSEM_COREID_CPU1 HSEM_CR_COREID_CPU1
  48. #if defined(DUAL_CORE)
  49. #define LL_HSEM_COREID_CPU2 HSEM_CR_COREID_CPU2
  50. #endif /* DUAL_CORE */
  51. #define LL_HSEM_COREID HSEM_CR_COREID_CURRENT
  52. /**
  53. * @}
  54. */
  55. /** @defgroup HSEM_LL_EC_GET_FLAG Get Flags Defines
  56. * @brief Flags defines which can be used with LL_HSEM_ReadReg function
  57. * @{
  58. */
  59. #define LL_HSEM_SEMAPHORE_0 HSEM_C1IER_ISE0
  60. #define LL_HSEM_SEMAPHORE_1 HSEM_C1IER_ISE1
  61. #define LL_HSEM_SEMAPHORE_2 HSEM_C1IER_ISE2
  62. #define LL_HSEM_SEMAPHORE_3 HSEM_C1IER_ISE3
  63. #define LL_HSEM_SEMAPHORE_4 HSEM_C1IER_ISE4
  64. #define LL_HSEM_SEMAPHORE_5 HSEM_C1IER_ISE5
  65. #define LL_HSEM_SEMAPHORE_6 HSEM_C1IER_ISE6
  66. #define LL_HSEM_SEMAPHORE_7 HSEM_C1IER_ISE7
  67. #define LL_HSEM_SEMAPHORE_8 HSEM_C1IER_ISE8
  68. #define LL_HSEM_SEMAPHORE_9 HSEM_C1IER_ISE9
  69. #define LL_HSEM_SEMAPHORE_10 HSEM_C1IER_ISE10
  70. #define LL_HSEM_SEMAPHORE_11 HSEM_C1IER_ISE11
  71. #define LL_HSEM_SEMAPHORE_12 HSEM_C1IER_ISE12
  72. #define LL_HSEM_SEMAPHORE_13 HSEM_C1IER_ISE13
  73. #define LL_HSEM_SEMAPHORE_14 HSEM_C1IER_ISE14
  74. #define LL_HSEM_SEMAPHORE_15 HSEM_C1IER_ISE15
  75. #define LL_HSEM_SEMAPHORE_16 HSEM_C1IER_ISE16
  76. #define LL_HSEM_SEMAPHORE_17 HSEM_C1IER_ISE17
  77. #define LL_HSEM_SEMAPHORE_18 HSEM_C1IER_ISE18
  78. #define LL_HSEM_SEMAPHORE_19 HSEM_C1IER_ISE19
  79. #define LL_HSEM_SEMAPHORE_20 HSEM_C1IER_ISE20
  80. #define LL_HSEM_SEMAPHORE_21 HSEM_C1IER_ISE21
  81. #define LL_HSEM_SEMAPHORE_22 HSEM_C1IER_ISE22
  82. #define LL_HSEM_SEMAPHORE_23 HSEM_C1IER_ISE23
  83. #define LL_HSEM_SEMAPHORE_24 HSEM_C1IER_ISE24
  84. #define LL_HSEM_SEMAPHORE_25 HSEM_C1IER_ISE25
  85. #define LL_HSEM_SEMAPHORE_26 HSEM_C1IER_ISE26
  86. #define LL_HSEM_SEMAPHORE_27 HSEM_C1IER_ISE27
  87. #define LL_HSEM_SEMAPHORE_28 HSEM_C1IER_ISE28
  88. #define LL_HSEM_SEMAPHORE_29 HSEM_C1IER_ISE29
  89. #define LL_HSEM_SEMAPHORE_30 HSEM_C1IER_ISE30
  90. #define LL_HSEM_SEMAPHORE_31 HSEM_C1IER_ISE31
  91. #define LL_HSEM_SEMAPHORE_ALL 0xFFFFFFFFU
  92. /**
  93. * @}
  94. */
  95. /**
  96. * @}
  97. */
  98. /* Exported macro ------------------------------------------------------------*/
  99. /** @defgroup HSEM_LL_Exported_Macros HSEM Exported Macros
  100. * @{
  101. */
  102. /** @defgroup HSEM_LL_EM_WRITE_READ Common Write and read registers Macros
  103. * @{
  104. */
  105. /**
  106. * @brief Write a value in HSEM register
  107. * @param __INSTANCE__ HSEM Instance
  108. * @param __REG__ Register to be written
  109. * @param __VALUE__ Value to be written in the register
  110. * @retval None
  111. */
  112. #define LL_HSEM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
  113. /**
  114. * @brief Read a value in HSEM register
  115. * @param __INSTANCE__ HSEM Instance
  116. * @param __REG__ Register to be read
  117. * @retval Register value
  118. */
  119. #define LL_HSEM_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
  120. /**
  121. * @}
  122. */
  123. /**
  124. * @}
  125. */
  126. /* Exported functions --------------------------------------------------------*/
  127. /** @defgroup HSEM_LL_Exported_Functions HSEM Exported Functions
  128. * @{
  129. */
  130. /** @defgroup HSEM_LL_EF_Data_Management Data_Management
  131. * @{
  132. */
  133. /**
  134. * @brief Return 1 if the semaphore is locked, else return 0.
  135. * @rmtoll R LOCK LL_HSEM_IsSemaphoreLocked
  136. * @param HSEMx HSEM Instance.
  137. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  138. * @retval State of bit (1 or 0).
  139. */
  140. __STATIC_INLINE uint32_t LL_HSEM_IsSemaphoreLocked(HSEM_TypeDef *HSEMx, uint32_t Semaphore)
  141. {
  142. return ((READ_BIT(HSEMx->R[Semaphore], HSEM_R_LOCK) == (HSEM_R_LOCK_Msk)) ? 1UL : 0UL);
  143. }
  144. /**
  145. * @brief Get core id.
  146. * @rmtoll R COREID LL_HSEM_GetCoreId
  147. * @param HSEMx HSEM Instance.
  148. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  149. * @retval Returned value can be one of the following values:
  150. * @arg @ref LL_HSEM_COREID_NONE
  151. * @arg @ref LL_HSEM_COREID_CPU1
  152. * @arg @ref LL_HSEM_COREID_CPU2
  153. */
  154. __STATIC_INLINE uint32_t LL_HSEM_GetCoreId(HSEM_TypeDef *HSEMx, uint32_t Semaphore)
  155. {
  156. return (uint32_t)(READ_BIT(HSEMx->R[Semaphore], HSEM_R_COREID_Msk));
  157. }
  158. /**
  159. * @brief Get process id.
  160. * @rmtoll R PROCID LL_HSEM_GetProcessId
  161. * @param HSEMx HSEM Instance.
  162. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  163. * @retval Process number. Value between Min_Data=0 and Max_Data=255
  164. */
  165. __STATIC_INLINE uint32_t LL_HSEM_GetProcessId(HSEM_TypeDef *HSEMx, uint32_t Semaphore)
  166. {
  167. return (uint32_t)(READ_BIT(HSEMx->R[Semaphore], HSEM_R_PROCID_Msk));
  168. }
  169. /**
  170. * @brief Get the lock by writing in R register.
  171. * @note The R register has to be read to determined if the lock is taken.
  172. * @rmtoll R LOCK LL_HSEM_SetLock
  173. * @rmtoll R COREID LL_HSEM_SetLock
  174. * @rmtoll R PROCID LL_HSEM_SetLock
  175. * @param HSEMx HSEM Instance.
  176. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  177. * @param process Process id. Value between Min_Data=0 and Max_Data=255
  178. * @retval None
  179. */
  180. __STATIC_INLINE void LL_HSEM_SetLock(HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process)
  181. {
  182. WRITE_REG(HSEMx->R[Semaphore], (HSEM_R_LOCK | LL_HSEM_COREID | process));
  183. }
  184. /**
  185. * @brief Get the lock with 2-step lock.
  186. * @rmtoll R LOCK LL_HSEM_2StepLock
  187. * @rmtoll R COREID LL_HSEM_2StepLock
  188. * @rmtoll R PROCID LL_HSEM_2StepLock
  189. * @param HSEMx HSEM Instance.
  190. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  191. * @param process Process id. Value between Min_Data=0 and Max_Data=255
  192. * @retval 1 lock fail, 0 lock successful or already locked by same process and core
  193. */
  194. __STATIC_INLINE uint32_t LL_HSEM_2StepLock(HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process)
  195. {
  196. WRITE_REG(HSEMx->R[Semaphore], (HSEM_R_LOCK | LL_HSEM_COREID | process));
  197. return ((HSEMx->R[Semaphore] != (HSEM_R_LOCK | LL_HSEM_COREID | process)) ? 1UL : 0UL);
  198. }
  199. /**
  200. * @brief Get the lock with 1-step lock.
  201. * @rmtoll RLR LOCK LL_HSEM_1StepLock
  202. * @rmtoll RLR COREID LL_HSEM_1StepLock
  203. * @rmtoll RLR PROCID LL_HSEM_1StepLock
  204. * @param HSEMx HSEM Instance.
  205. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  206. * @retval 1 lock fail, 0 lock successful or already locked by same core
  207. */
  208. __STATIC_INLINE uint32_t LL_HSEM_1StepLock(HSEM_TypeDef *HSEMx, uint32_t Semaphore)
  209. {
  210. return ((HSEMx->RLR[Semaphore] != (HSEM_R_LOCK | LL_HSEM_COREID)) ? 1UL : 0UL);
  211. }
  212. /**
  213. * @brief Release the lock of the semaphore.
  214. * @note In case of LL_HSEM_1StepLock usage to lock a semaphore, the process is 0.
  215. * @rmtoll R LOCK LL_HSEM_ReleaseLock
  216. * @param HSEMx HSEM Instance.
  217. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  218. * @param process Process number. Value between Min_Data=0 and Max_Data=255
  219. * @retval None
  220. */
  221. __STATIC_INLINE void LL_HSEM_ReleaseLock(HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process)
  222. {
  223. WRITE_REG(HSEMx->R[Semaphore], (LL_HSEM_COREID | process));
  224. }
  225. /**
  226. * @brief Get the lock status of the semaphore.
  227. * @rmtoll R LOCK LL_HSEM_GetStatus
  228. * @param HSEMx HSEM Instance.
  229. * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31
  230. * @retval 0 semaphore is free, 1 semaphore is locked */
  231. __STATIC_INLINE uint32_t LL_HSEM_GetStatus(HSEM_TypeDef *HSEMx, uint32_t Semaphore)
  232. {
  233. return ((HSEMx->R[Semaphore] != 0U) ? 1UL : 0UL);
  234. }
  235. /**
  236. * @brief Set the key.
  237. * @rmtoll KEYR KEY LL_HSEM_SetKey
  238. * @param HSEMx HSEM Instance.
  239. * @param key Key value.
  240. * @retval None
  241. */
  242. __STATIC_INLINE void LL_HSEM_SetKey(HSEM_TypeDef *HSEMx, uint32_t key)
  243. {
  244. WRITE_REG(HSEMx->KEYR, key << HSEM_KEYR_KEY_Pos);
  245. }
  246. /**
  247. * @brief Get the key.
  248. * @rmtoll KEYR KEY LL_HSEM_GetKey
  249. * @param HSEMx HSEM Instance.
  250. * @retval key to unlock all semaphore from the same core
  251. */
  252. __STATIC_INLINE uint32_t LL_HSEM_GetKey(HSEM_TypeDef *HSEMx)
  253. {
  254. return (uint32_t)(READ_BIT(HSEMx->KEYR, HSEM_KEYR_KEY) >> HSEM_KEYR_KEY_Pos);
  255. }
  256. /**
  257. * @brief Release all semaphore with the same core id.
  258. * @rmtoll CR KEY LL_HSEM_ResetAllLock
  259. * @param HSEMx HSEM Instance.
  260. * @param key Key value.
  261. * @param core This parameter can be one of the following values:
  262. * @arg @ref LL_HSEM_COREID_CPU1
  263. * @arg @ref LL_HSEM_COREID_CPU2
  264. * @retval None
  265. */
  266. __STATIC_INLINE void LL_HSEM_ResetAllLock(HSEM_TypeDef *HSEMx, uint32_t key, uint32_t core)
  267. {
  268. WRITE_REG(HSEMx->CR, (key << HSEM_CR_KEY_Pos) | core);
  269. }
  270. /**
  271. * @}
  272. */
  273. /** @defgroup HSEM_LL_EF_IT_Management IT_Management
  274. * @{
  275. */
  276. /**
  277. * @brief Enable interrupt.
  278. * @rmtoll C1IER ISEM LL_HSEM_EnableIT_C1IER
  279. * @param HSEMx HSEM Instance.
  280. * @param SemaphoreMask This parameter can be a combination of the following values:
  281. * @arg @ref LL_HSEM_SEMAPHORE_0
  282. * @arg @ref LL_HSEM_SEMAPHORE_1
  283. * @arg @ref LL_HSEM_SEMAPHORE_2
  284. * @arg @ref LL_HSEM_SEMAPHORE_3
  285. * @arg @ref LL_HSEM_SEMAPHORE_4
  286. * @arg @ref LL_HSEM_SEMAPHORE_5
  287. * @arg @ref LL_HSEM_SEMAPHORE_6
  288. * @arg @ref LL_HSEM_SEMAPHORE_7
  289. * @arg @ref LL_HSEM_SEMAPHORE_8
  290. * @arg @ref LL_HSEM_SEMAPHORE_9
  291. * @arg @ref LL_HSEM_SEMAPHORE_10
  292. * @arg @ref LL_HSEM_SEMAPHORE_11
  293. * @arg @ref LL_HSEM_SEMAPHORE_12
  294. * @arg @ref LL_HSEM_SEMAPHORE_13
  295. * @arg @ref LL_HSEM_SEMAPHORE_14
  296. * @arg @ref LL_HSEM_SEMAPHORE_15
  297. * @arg @ref LL_HSEM_SEMAPHORE_16
  298. * @arg @ref LL_HSEM_SEMAPHORE_17
  299. * @arg @ref LL_HSEM_SEMAPHORE_18
  300. * @arg @ref LL_HSEM_SEMAPHORE_19
  301. * @arg @ref LL_HSEM_SEMAPHORE_20
  302. * @arg @ref LL_HSEM_SEMAPHORE_21
  303. * @arg @ref LL_HSEM_SEMAPHORE_22
  304. * @arg @ref LL_HSEM_SEMAPHORE_23
  305. * @arg @ref LL_HSEM_SEMAPHORE_24
  306. * @arg @ref LL_HSEM_SEMAPHORE_25
  307. * @arg @ref LL_HSEM_SEMAPHORE_26
  308. * @arg @ref LL_HSEM_SEMAPHORE_27
  309. * @arg @ref LL_HSEM_SEMAPHORE_28
  310. * @arg @ref LL_HSEM_SEMAPHORE_29
  311. * @arg @ref LL_HSEM_SEMAPHORE_30
  312. * @arg @ref LL_HSEM_SEMAPHORE_31
  313. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  314. * @retval None
  315. */
  316. __STATIC_INLINE void LL_HSEM_EnableIT_C1IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  317. {
  318. SET_BIT(HSEMx->C1IER, SemaphoreMask);
  319. }
  320. /**
  321. * @brief Disable interrupt.
  322. * @rmtoll C1IER ISEM LL_HSEM_DisableIT_C1IER
  323. * @param HSEMx HSEM Instance.
  324. * @param SemaphoreMask This parameter can be a combination of the following values:
  325. * @arg @ref LL_HSEM_SEMAPHORE_0
  326. * @arg @ref LL_HSEM_SEMAPHORE_1
  327. * @arg @ref LL_HSEM_SEMAPHORE_2
  328. * @arg @ref LL_HSEM_SEMAPHORE_3
  329. * @arg @ref LL_HSEM_SEMAPHORE_4
  330. * @arg @ref LL_HSEM_SEMAPHORE_5
  331. * @arg @ref LL_HSEM_SEMAPHORE_6
  332. * @arg @ref LL_HSEM_SEMAPHORE_7
  333. * @arg @ref LL_HSEM_SEMAPHORE_8
  334. * @arg @ref LL_HSEM_SEMAPHORE_9
  335. * @arg @ref LL_HSEM_SEMAPHORE_10
  336. * @arg @ref LL_HSEM_SEMAPHORE_11
  337. * @arg @ref LL_HSEM_SEMAPHORE_12
  338. * @arg @ref LL_HSEM_SEMAPHORE_13
  339. * @arg @ref LL_HSEM_SEMAPHORE_14
  340. * @arg @ref LL_HSEM_SEMAPHORE_15
  341. * @arg @ref LL_HSEM_SEMAPHORE_16
  342. * @arg @ref LL_HSEM_SEMAPHORE_17
  343. * @arg @ref LL_HSEM_SEMAPHORE_18
  344. * @arg @ref LL_HSEM_SEMAPHORE_19
  345. * @arg @ref LL_HSEM_SEMAPHORE_20
  346. * @arg @ref LL_HSEM_SEMAPHORE_21
  347. * @arg @ref LL_HSEM_SEMAPHORE_22
  348. * @arg @ref LL_HSEM_SEMAPHORE_23
  349. * @arg @ref LL_HSEM_SEMAPHORE_24
  350. * @arg @ref LL_HSEM_SEMAPHORE_25
  351. * @arg @ref LL_HSEM_SEMAPHORE_26
  352. * @arg @ref LL_HSEM_SEMAPHORE_27
  353. * @arg @ref LL_HSEM_SEMAPHORE_28
  354. * @arg @ref LL_HSEM_SEMAPHORE_29
  355. * @arg @ref LL_HSEM_SEMAPHORE_30
  356. * @arg @ref LL_HSEM_SEMAPHORE_31
  357. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  358. * @retval None
  359. */
  360. __STATIC_INLINE void LL_HSEM_DisableIT_C1IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  361. {
  362. CLEAR_BIT(HSEMx->C1IER, SemaphoreMask);
  363. }
  364. /**
  365. * @brief Check if interrupt is enabled.
  366. * @rmtoll C1IER ISEM LL_HSEM_IsEnabledIT_C1IER
  367. * @param HSEMx HSEM Instance.
  368. * @param SemaphoreMask This parameter can be a combination of the following values:
  369. * @arg @ref LL_HSEM_SEMAPHORE_0
  370. * @arg @ref LL_HSEM_SEMAPHORE_1
  371. * @arg @ref LL_HSEM_SEMAPHORE_2
  372. * @arg @ref LL_HSEM_SEMAPHORE_3
  373. * @arg @ref LL_HSEM_SEMAPHORE_4
  374. * @arg @ref LL_HSEM_SEMAPHORE_5
  375. * @arg @ref LL_HSEM_SEMAPHORE_6
  376. * @arg @ref LL_HSEM_SEMAPHORE_7
  377. * @arg @ref LL_HSEM_SEMAPHORE_8
  378. * @arg @ref LL_HSEM_SEMAPHORE_9
  379. * @arg @ref LL_HSEM_SEMAPHORE_10
  380. * @arg @ref LL_HSEM_SEMAPHORE_11
  381. * @arg @ref LL_HSEM_SEMAPHORE_12
  382. * @arg @ref LL_HSEM_SEMAPHORE_13
  383. * @arg @ref LL_HSEM_SEMAPHORE_14
  384. * @arg @ref LL_HSEM_SEMAPHORE_15
  385. * @arg @ref LL_HSEM_SEMAPHORE_16
  386. * @arg @ref LL_HSEM_SEMAPHORE_17
  387. * @arg @ref LL_HSEM_SEMAPHORE_18
  388. * @arg @ref LL_HSEM_SEMAPHORE_19
  389. * @arg @ref LL_HSEM_SEMAPHORE_20
  390. * @arg @ref LL_HSEM_SEMAPHORE_21
  391. * @arg @ref LL_HSEM_SEMAPHORE_22
  392. * @arg @ref LL_HSEM_SEMAPHORE_23
  393. * @arg @ref LL_HSEM_SEMAPHORE_24
  394. * @arg @ref LL_HSEM_SEMAPHORE_25
  395. * @arg @ref LL_HSEM_SEMAPHORE_26
  396. * @arg @ref LL_HSEM_SEMAPHORE_27
  397. * @arg @ref LL_HSEM_SEMAPHORE_28
  398. * @arg @ref LL_HSEM_SEMAPHORE_29
  399. * @arg @ref LL_HSEM_SEMAPHORE_30
  400. * @arg @ref LL_HSEM_SEMAPHORE_31
  401. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  402. * @retval State of bit (1 or 0).
  403. */
  404. __STATIC_INLINE uint32_t LL_HSEM_IsEnabledIT_C1IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  405. {
  406. return ((READ_BIT(HSEMx->C1IER, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL);
  407. }
  408. #if defined(DUAL_CORE)
  409. /**
  410. * @brief Enable interrupt.
  411. * @rmtoll C2IER ISEM LL_HSEM_EnableIT_C2IER
  412. * @param HSEMx HSEM Instance.
  413. * @param SemaphoreMask This parameter can be a combination of the following values:
  414. * @arg @ref LL_HSEM_SEMAPHORE_0
  415. * @arg @ref LL_HSEM_SEMAPHORE_1
  416. * @arg @ref LL_HSEM_SEMAPHORE_2
  417. * @arg @ref LL_HSEM_SEMAPHORE_3
  418. * @arg @ref LL_HSEM_SEMAPHORE_4
  419. * @arg @ref LL_HSEM_SEMAPHORE_5
  420. * @arg @ref LL_HSEM_SEMAPHORE_6
  421. * @arg @ref LL_HSEM_SEMAPHORE_7
  422. * @arg @ref LL_HSEM_SEMAPHORE_8
  423. * @arg @ref LL_HSEM_SEMAPHORE_9
  424. * @arg @ref LL_HSEM_SEMAPHORE_10
  425. * @arg @ref LL_HSEM_SEMAPHORE_11
  426. * @arg @ref LL_HSEM_SEMAPHORE_12
  427. * @arg @ref LL_HSEM_SEMAPHORE_13
  428. * @arg @ref LL_HSEM_SEMAPHORE_14
  429. * @arg @ref LL_HSEM_SEMAPHORE_15
  430. * @arg @ref LL_HSEM_SEMAPHORE_16
  431. * @arg @ref LL_HSEM_SEMAPHORE_17
  432. * @arg @ref LL_HSEM_SEMAPHORE_18
  433. * @arg @ref LL_HSEM_SEMAPHORE_19
  434. * @arg @ref LL_HSEM_SEMAPHORE_20
  435. * @arg @ref LL_HSEM_SEMAPHORE_21
  436. * @arg @ref LL_HSEM_SEMAPHORE_22
  437. * @arg @ref LL_HSEM_SEMAPHORE_23
  438. * @arg @ref LL_HSEM_SEMAPHORE_24
  439. * @arg @ref LL_HSEM_SEMAPHORE_25
  440. * @arg @ref LL_HSEM_SEMAPHORE_26
  441. * @arg @ref LL_HSEM_SEMAPHORE_27
  442. * @arg @ref LL_HSEM_SEMAPHORE_28
  443. * @arg @ref LL_HSEM_SEMAPHORE_29
  444. * @arg @ref LL_HSEM_SEMAPHORE_30
  445. * @arg @ref LL_HSEM_SEMAPHORE_31
  446. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  447. * @retval None
  448. */
  449. __STATIC_INLINE void LL_HSEM_EnableIT_C2IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  450. {
  451. SET_BIT(HSEMx->C2IER, SemaphoreMask);
  452. }
  453. /**
  454. * @brief Disable interrupt.
  455. * @rmtoll C2IER ISEM LL_HSEM_DisableIT_C2IER
  456. * @param HSEMx HSEM Instance.
  457. * @param SemaphoreMask This parameter can be a combination of the following values:
  458. * @arg @ref LL_HSEM_SEMAPHORE_0
  459. * @arg @ref LL_HSEM_SEMAPHORE_1
  460. * @arg @ref LL_HSEM_SEMAPHORE_2
  461. * @arg @ref LL_HSEM_SEMAPHORE_3
  462. * @arg @ref LL_HSEM_SEMAPHORE_4
  463. * @arg @ref LL_HSEM_SEMAPHORE_5
  464. * @arg @ref LL_HSEM_SEMAPHORE_6
  465. * @arg @ref LL_HSEM_SEMAPHORE_7
  466. * @arg @ref LL_HSEM_SEMAPHORE_8
  467. * @arg @ref LL_HSEM_SEMAPHORE_9
  468. * @arg @ref LL_HSEM_SEMAPHORE_10
  469. * @arg @ref LL_HSEM_SEMAPHORE_11
  470. * @arg @ref LL_HSEM_SEMAPHORE_12
  471. * @arg @ref LL_HSEM_SEMAPHORE_13
  472. * @arg @ref LL_HSEM_SEMAPHORE_14
  473. * @arg @ref LL_HSEM_SEMAPHORE_15
  474. * @arg @ref LL_HSEM_SEMAPHORE_16
  475. * @arg @ref LL_HSEM_SEMAPHORE_17
  476. * @arg @ref LL_HSEM_SEMAPHORE_18
  477. * @arg @ref LL_HSEM_SEMAPHORE_19
  478. * @arg @ref LL_HSEM_SEMAPHORE_20
  479. * @arg @ref LL_HSEM_SEMAPHORE_21
  480. * @arg @ref LL_HSEM_SEMAPHORE_22
  481. * @arg @ref LL_HSEM_SEMAPHORE_23
  482. * @arg @ref LL_HSEM_SEMAPHORE_24
  483. * @arg @ref LL_HSEM_SEMAPHORE_25
  484. * @arg @ref LL_HSEM_SEMAPHORE_26
  485. * @arg @ref LL_HSEM_SEMAPHORE_27
  486. * @arg @ref LL_HSEM_SEMAPHORE_28
  487. * @arg @ref LL_HSEM_SEMAPHORE_29
  488. * @arg @ref LL_HSEM_SEMAPHORE_30
  489. * @arg @ref LL_HSEM_SEMAPHORE_31
  490. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  491. * @retval None
  492. */
  493. __STATIC_INLINE void LL_HSEM_DisableIT_C2IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  494. {
  495. CLEAR_BIT(HSEMx->C2IER, SemaphoreMask);
  496. }
  497. /**
  498. * @brief Check if interrupt is enabled.
  499. * @rmtoll C2IER ISEM LL_HSEM_IsEnabledIT_C2IER
  500. * @param HSEMx HSEM Instance.
  501. * @param SemaphoreMask This parameter can be a combination of the following values:
  502. * @arg @ref LL_HSEM_SEMAPHORE_0
  503. * @arg @ref LL_HSEM_SEMAPHORE_1
  504. * @arg @ref LL_HSEM_SEMAPHORE_2
  505. * @arg @ref LL_HSEM_SEMAPHORE_3
  506. * @arg @ref LL_HSEM_SEMAPHORE_4
  507. * @arg @ref LL_HSEM_SEMAPHORE_5
  508. * @arg @ref LL_HSEM_SEMAPHORE_6
  509. * @arg @ref LL_HSEM_SEMAPHORE_7
  510. * @arg @ref LL_HSEM_SEMAPHORE_8
  511. * @arg @ref LL_HSEM_SEMAPHORE_9
  512. * @arg @ref LL_HSEM_SEMAPHORE_10
  513. * @arg @ref LL_HSEM_SEMAPHORE_11
  514. * @arg @ref LL_HSEM_SEMAPHORE_12
  515. * @arg @ref LL_HSEM_SEMAPHORE_13
  516. * @arg @ref LL_HSEM_SEMAPHORE_14
  517. * @arg @ref LL_HSEM_SEMAPHORE_15
  518. * @arg @ref LL_HSEM_SEMAPHORE_16
  519. * @arg @ref LL_HSEM_SEMAPHORE_17
  520. * @arg @ref LL_HSEM_SEMAPHORE_18
  521. * @arg @ref LL_HSEM_SEMAPHORE_19
  522. * @arg @ref LL_HSEM_SEMAPHORE_20
  523. * @arg @ref LL_HSEM_SEMAPHORE_21
  524. * @arg @ref LL_HSEM_SEMAPHORE_22
  525. * @arg @ref LL_HSEM_SEMAPHORE_23
  526. * @arg @ref LL_HSEM_SEMAPHORE_24
  527. * @arg @ref LL_HSEM_SEMAPHORE_25
  528. * @arg @ref LL_HSEM_SEMAPHORE_26
  529. * @arg @ref LL_HSEM_SEMAPHORE_27
  530. * @arg @ref LL_HSEM_SEMAPHORE_28
  531. * @arg @ref LL_HSEM_SEMAPHORE_29
  532. * @arg @ref LL_HSEM_SEMAPHORE_30
  533. * @arg @ref LL_HSEM_SEMAPHORE_31
  534. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  535. * @retval State of bit (1 or 0).
  536. */
  537. __STATIC_INLINE uint32_t LL_HSEM_IsEnabledIT_C2IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  538. {
  539. return ((READ_BIT(HSEMx->C2IER, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL);
  540. }
  541. #endif /* DUAL_CORE */
  542. /**
  543. * @}
  544. */
  545. /** @defgroup HSEM_LL_EF_FLAG_Management FLAG_Management
  546. * @{
  547. */
  548. /**
  549. * @brief Clear interrupt status.
  550. * @rmtoll C1ICR ISEM LL_HSEM_ClearFlag_C1ICR
  551. * @param HSEMx HSEM Instance.
  552. * @param SemaphoreMask This parameter can be a combination of the following values:
  553. * @arg @ref LL_HSEM_SEMAPHORE_0
  554. * @arg @ref LL_HSEM_SEMAPHORE_1
  555. * @arg @ref LL_HSEM_SEMAPHORE_2
  556. * @arg @ref LL_HSEM_SEMAPHORE_3
  557. * @arg @ref LL_HSEM_SEMAPHORE_4
  558. * @arg @ref LL_HSEM_SEMAPHORE_5
  559. * @arg @ref LL_HSEM_SEMAPHORE_6
  560. * @arg @ref LL_HSEM_SEMAPHORE_7
  561. * @arg @ref LL_HSEM_SEMAPHORE_8
  562. * @arg @ref LL_HSEM_SEMAPHORE_9
  563. * @arg @ref LL_HSEM_SEMAPHORE_10
  564. * @arg @ref LL_HSEM_SEMAPHORE_11
  565. * @arg @ref LL_HSEM_SEMAPHORE_12
  566. * @arg @ref LL_HSEM_SEMAPHORE_13
  567. * @arg @ref LL_HSEM_SEMAPHORE_14
  568. * @arg @ref LL_HSEM_SEMAPHORE_15
  569. * @arg @ref LL_HSEM_SEMAPHORE_16
  570. * @arg @ref LL_HSEM_SEMAPHORE_17
  571. * @arg @ref LL_HSEM_SEMAPHORE_18
  572. * @arg @ref LL_HSEM_SEMAPHORE_19
  573. * @arg @ref LL_HSEM_SEMAPHORE_20
  574. * @arg @ref LL_HSEM_SEMAPHORE_21
  575. * @arg @ref LL_HSEM_SEMAPHORE_22
  576. * @arg @ref LL_HSEM_SEMAPHORE_23
  577. * @arg @ref LL_HSEM_SEMAPHORE_24
  578. * @arg @ref LL_HSEM_SEMAPHORE_25
  579. * @arg @ref LL_HSEM_SEMAPHORE_26
  580. * @arg @ref LL_HSEM_SEMAPHORE_27
  581. * @arg @ref LL_HSEM_SEMAPHORE_28
  582. * @arg @ref LL_HSEM_SEMAPHORE_29
  583. * @arg @ref LL_HSEM_SEMAPHORE_30
  584. * @arg @ref LL_HSEM_SEMAPHORE_31
  585. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  586. * @retval None
  587. */
  588. __STATIC_INLINE void LL_HSEM_ClearFlag_C1ICR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  589. {
  590. WRITE_REG(HSEMx->C1ICR, SemaphoreMask);
  591. }
  592. /**
  593. * @brief Get interrupt status from ISR register.
  594. * @rmtoll C1ISR ISEM LL_HSEM_IsActiveFlag_C1ISR
  595. * @param HSEMx HSEM Instance.
  596. * @param SemaphoreMask This parameter can be a combination of the following values:
  597. * @arg @ref LL_HSEM_SEMAPHORE_0
  598. * @arg @ref LL_HSEM_SEMAPHORE_1
  599. * @arg @ref LL_HSEM_SEMAPHORE_2
  600. * @arg @ref LL_HSEM_SEMAPHORE_3
  601. * @arg @ref LL_HSEM_SEMAPHORE_4
  602. * @arg @ref LL_HSEM_SEMAPHORE_5
  603. * @arg @ref LL_HSEM_SEMAPHORE_6
  604. * @arg @ref LL_HSEM_SEMAPHORE_7
  605. * @arg @ref LL_HSEM_SEMAPHORE_8
  606. * @arg @ref LL_HSEM_SEMAPHORE_9
  607. * @arg @ref LL_HSEM_SEMAPHORE_10
  608. * @arg @ref LL_HSEM_SEMAPHORE_11
  609. * @arg @ref LL_HSEM_SEMAPHORE_12
  610. * @arg @ref LL_HSEM_SEMAPHORE_13
  611. * @arg @ref LL_HSEM_SEMAPHORE_14
  612. * @arg @ref LL_HSEM_SEMAPHORE_15
  613. * @arg @ref LL_HSEM_SEMAPHORE_16
  614. * @arg @ref LL_HSEM_SEMAPHORE_17
  615. * @arg @ref LL_HSEM_SEMAPHORE_18
  616. * @arg @ref LL_HSEM_SEMAPHORE_19
  617. * @arg @ref LL_HSEM_SEMAPHORE_20
  618. * @arg @ref LL_HSEM_SEMAPHORE_21
  619. * @arg @ref LL_HSEM_SEMAPHORE_22
  620. * @arg @ref LL_HSEM_SEMAPHORE_23
  621. * @arg @ref LL_HSEM_SEMAPHORE_24
  622. * @arg @ref LL_HSEM_SEMAPHORE_25
  623. * @arg @ref LL_HSEM_SEMAPHORE_26
  624. * @arg @ref LL_HSEM_SEMAPHORE_27
  625. * @arg @ref LL_HSEM_SEMAPHORE_28
  626. * @arg @ref LL_HSEM_SEMAPHORE_29
  627. * @arg @ref LL_HSEM_SEMAPHORE_30
  628. * @arg @ref LL_HSEM_SEMAPHORE_31
  629. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  630. * @retval State of bit (1 or 0).
  631. */
  632. __STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C1ISR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  633. {
  634. return ((READ_BIT(HSEMx->C1ISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL);
  635. }
  636. /**
  637. * @brief Get interrupt status from MISR register.
  638. * @rmtoll C1MISR ISEM LL_HSEM_IsActiveFlag_C1MISR
  639. * @param HSEMx HSEM Instance.
  640. * @param SemaphoreMask This parameter can be a combination of the following values:
  641. * @arg @ref LL_HSEM_SEMAPHORE_0
  642. * @arg @ref LL_HSEM_SEMAPHORE_1
  643. * @arg @ref LL_HSEM_SEMAPHORE_2
  644. * @arg @ref LL_HSEM_SEMAPHORE_3
  645. * @arg @ref LL_HSEM_SEMAPHORE_4
  646. * @arg @ref LL_HSEM_SEMAPHORE_5
  647. * @arg @ref LL_HSEM_SEMAPHORE_6
  648. * @arg @ref LL_HSEM_SEMAPHORE_7
  649. * @arg @ref LL_HSEM_SEMAPHORE_8
  650. * @arg @ref LL_HSEM_SEMAPHORE_9
  651. * @arg @ref LL_HSEM_SEMAPHORE_10
  652. * @arg @ref LL_HSEM_SEMAPHORE_11
  653. * @arg @ref LL_HSEM_SEMAPHORE_12
  654. * @arg @ref LL_HSEM_SEMAPHORE_13
  655. * @arg @ref LL_HSEM_SEMAPHORE_14
  656. * @arg @ref LL_HSEM_SEMAPHORE_15
  657. * @arg @ref LL_HSEM_SEMAPHORE_16
  658. * @arg @ref LL_HSEM_SEMAPHORE_17
  659. * @arg @ref LL_HSEM_SEMAPHORE_18
  660. * @arg @ref LL_HSEM_SEMAPHORE_19
  661. * @arg @ref LL_HSEM_SEMAPHORE_20
  662. * @arg @ref LL_HSEM_SEMAPHORE_21
  663. * @arg @ref LL_HSEM_SEMAPHORE_22
  664. * @arg @ref LL_HSEM_SEMAPHORE_23
  665. * @arg @ref LL_HSEM_SEMAPHORE_24
  666. * @arg @ref LL_HSEM_SEMAPHORE_25
  667. * @arg @ref LL_HSEM_SEMAPHORE_26
  668. * @arg @ref LL_HSEM_SEMAPHORE_27
  669. * @arg @ref LL_HSEM_SEMAPHORE_28
  670. * @arg @ref LL_HSEM_SEMAPHORE_29
  671. * @arg @ref LL_HSEM_SEMAPHORE_30
  672. * @arg @ref LL_HSEM_SEMAPHORE_31
  673. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  674. * @retval State of bit (1 or 0).
  675. */
  676. __STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C1MISR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  677. {
  678. return ((READ_BIT(HSEMx->C1MISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL);
  679. }
  680. #if defined(DUAL_CORE)
  681. /**
  682. * @brief Clear interrupt status.
  683. * @rmtoll C2ICR ISEM LL_HSEM_ClearFlag_C2ICR
  684. * @param HSEMx HSEM Instance.
  685. * @param SemaphoreMask This parameter can be a combination of the following values:
  686. * @arg @ref LL_HSEM_SEMAPHORE_0
  687. * @arg @ref LL_HSEM_SEMAPHORE_1
  688. * @arg @ref LL_HSEM_SEMAPHORE_2
  689. * @arg @ref LL_HSEM_SEMAPHORE_3
  690. * @arg @ref LL_HSEM_SEMAPHORE_4
  691. * @arg @ref LL_HSEM_SEMAPHORE_5
  692. * @arg @ref LL_HSEM_SEMAPHORE_6
  693. * @arg @ref LL_HSEM_SEMAPHORE_7
  694. * @arg @ref LL_HSEM_SEMAPHORE_8
  695. * @arg @ref LL_HSEM_SEMAPHORE_9
  696. * @arg @ref LL_HSEM_SEMAPHORE_10
  697. * @arg @ref LL_HSEM_SEMAPHORE_11
  698. * @arg @ref LL_HSEM_SEMAPHORE_12
  699. * @arg @ref LL_HSEM_SEMAPHORE_13
  700. * @arg @ref LL_HSEM_SEMAPHORE_14
  701. * @arg @ref LL_HSEM_SEMAPHORE_15
  702. * @arg @ref LL_HSEM_SEMAPHORE_16
  703. * @arg @ref LL_HSEM_SEMAPHORE_17
  704. * @arg @ref LL_HSEM_SEMAPHORE_18
  705. * @arg @ref LL_HSEM_SEMAPHORE_19
  706. * @arg @ref LL_HSEM_SEMAPHORE_20
  707. * @arg @ref LL_HSEM_SEMAPHORE_21
  708. * @arg @ref LL_HSEM_SEMAPHORE_22
  709. * @arg @ref LL_HSEM_SEMAPHORE_23
  710. * @arg @ref LL_HSEM_SEMAPHORE_24
  711. * @arg @ref LL_HSEM_SEMAPHORE_25
  712. * @arg @ref LL_HSEM_SEMAPHORE_26
  713. * @arg @ref LL_HSEM_SEMAPHORE_27
  714. * @arg @ref LL_HSEM_SEMAPHORE_28
  715. * @arg @ref LL_HSEM_SEMAPHORE_29
  716. * @arg @ref LL_HSEM_SEMAPHORE_30
  717. * @arg @ref LL_HSEM_SEMAPHORE_31
  718. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  719. * @retval None
  720. */
  721. __STATIC_INLINE void LL_HSEM_ClearFlag_C2ICR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  722. {
  723. WRITE_REG(HSEMx->C2ICR, SemaphoreMask);
  724. }
  725. /**
  726. * @brief Get interrupt status from ISR register.
  727. * @rmtoll C2ISR ISEM LL_HSEM_IsActiveFlag_C2ISR
  728. * @param HSEMx HSEM Instance.
  729. * @param SemaphoreMask This parameter can be a combination of the following values:
  730. * @arg @ref LL_HSEM_SEMAPHORE_0
  731. * @arg @ref LL_HSEM_SEMAPHORE_1
  732. * @arg @ref LL_HSEM_SEMAPHORE_2
  733. * @arg @ref LL_HSEM_SEMAPHORE_3
  734. * @arg @ref LL_HSEM_SEMAPHORE_4
  735. * @arg @ref LL_HSEM_SEMAPHORE_5
  736. * @arg @ref LL_HSEM_SEMAPHORE_6
  737. * @arg @ref LL_HSEM_SEMAPHORE_7
  738. * @arg @ref LL_HSEM_SEMAPHORE_8
  739. * @arg @ref LL_HSEM_SEMAPHORE_9
  740. * @arg @ref LL_HSEM_SEMAPHORE_10
  741. * @arg @ref LL_HSEM_SEMAPHORE_11
  742. * @arg @ref LL_HSEM_SEMAPHORE_12
  743. * @arg @ref LL_HSEM_SEMAPHORE_13
  744. * @arg @ref LL_HSEM_SEMAPHORE_14
  745. * @arg @ref LL_HSEM_SEMAPHORE_15
  746. * @arg @ref LL_HSEM_SEMAPHORE_16
  747. * @arg @ref LL_HSEM_SEMAPHORE_17
  748. * @arg @ref LL_HSEM_SEMAPHORE_18
  749. * @arg @ref LL_HSEM_SEMAPHORE_19
  750. * @arg @ref LL_HSEM_SEMAPHORE_20
  751. * @arg @ref LL_HSEM_SEMAPHORE_21
  752. * @arg @ref LL_HSEM_SEMAPHORE_22
  753. * @arg @ref LL_HSEM_SEMAPHORE_23
  754. * @arg @ref LL_HSEM_SEMAPHORE_24
  755. * @arg @ref LL_HSEM_SEMAPHORE_25
  756. * @arg @ref LL_HSEM_SEMAPHORE_26
  757. * @arg @ref LL_HSEM_SEMAPHORE_27
  758. * @arg @ref LL_HSEM_SEMAPHORE_28
  759. * @arg @ref LL_HSEM_SEMAPHORE_29
  760. * @arg @ref LL_HSEM_SEMAPHORE_30
  761. * @arg @ref LL_HSEM_SEMAPHORE_31
  762. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  763. * @retval State of bit (1 or 0).
  764. */
  765. __STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C2ISR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  766. {
  767. return ((READ_BIT(HSEMx->C2ISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL);
  768. }
  769. /**
  770. * @brief Get interrupt status from MISR register.
  771. * @rmtoll C2MISR ISEM LL_HSEM_IsActiveFlag_C2MISR
  772. * @param HSEMx HSEM Instance.
  773. * @param SemaphoreMask This parameter can be a combination of the following values:
  774. * @arg @ref LL_HSEM_SEMAPHORE_0
  775. * @arg @ref LL_HSEM_SEMAPHORE_1
  776. * @arg @ref LL_HSEM_SEMAPHORE_2
  777. * @arg @ref LL_HSEM_SEMAPHORE_3
  778. * @arg @ref LL_HSEM_SEMAPHORE_4
  779. * @arg @ref LL_HSEM_SEMAPHORE_5
  780. * @arg @ref LL_HSEM_SEMAPHORE_6
  781. * @arg @ref LL_HSEM_SEMAPHORE_7
  782. * @arg @ref LL_HSEM_SEMAPHORE_8
  783. * @arg @ref LL_HSEM_SEMAPHORE_9
  784. * @arg @ref LL_HSEM_SEMAPHORE_10
  785. * @arg @ref LL_HSEM_SEMAPHORE_11
  786. * @arg @ref LL_HSEM_SEMAPHORE_12
  787. * @arg @ref LL_HSEM_SEMAPHORE_13
  788. * @arg @ref LL_HSEM_SEMAPHORE_14
  789. * @arg @ref LL_HSEM_SEMAPHORE_15
  790. * @arg @ref LL_HSEM_SEMAPHORE_16
  791. * @arg @ref LL_HSEM_SEMAPHORE_17
  792. * @arg @ref LL_HSEM_SEMAPHORE_18
  793. * @arg @ref LL_HSEM_SEMAPHORE_19
  794. * @arg @ref LL_HSEM_SEMAPHORE_20
  795. * @arg @ref LL_HSEM_SEMAPHORE_21
  796. * @arg @ref LL_HSEM_SEMAPHORE_22
  797. * @arg @ref LL_HSEM_SEMAPHORE_23
  798. * @arg @ref LL_HSEM_SEMAPHORE_24
  799. * @arg @ref LL_HSEM_SEMAPHORE_25
  800. * @arg @ref LL_HSEM_SEMAPHORE_26
  801. * @arg @ref LL_HSEM_SEMAPHORE_27
  802. * @arg @ref LL_HSEM_SEMAPHORE_28
  803. * @arg @ref LL_HSEM_SEMAPHORE_29
  804. * @arg @ref LL_HSEM_SEMAPHORE_30
  805. * @arg @ref LL_HSEM_SEMAPHORE_31
  806. * @arg @ref LL_HSEM_SEMAPHORE_ALL
  807. * @retval State of bit (1 or 0).
  808. */
  809. __STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C2MISR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask)
  810. {
  811. return ((READ_BIT(HSEMx->C2MISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL);
  812. }
  813. #endif /* DUAL_CORE */
  814. /**
  815. * @}
  816. */
  817. /**
  818. * @}
  819. */
  820. /**
  821. * @}
  822. */
  823. #endif /* defined(HSEM) */
  824. /**
  825. * @}
  826. */
  827. #ifdef __cplusplus
  828. }
  829. #endif
  830. #endif /* __STM32H7xx_LL_HSEM_H */
  831. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/