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.
 
 
 

724 lines
28 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32wbxx_ll_ipcc.h
  4. * @author MCD Application Team
  5. * @brief Header file of IPCC LL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2019 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 STM32WBxx_LL_IPCC_H
  21. #define STM32WBxx_LL_IPCC_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32wbxx.h"
  27. /** @addtogroup STM32WBxx_LL_Driver
  28. * @{
  29. */
  30. #if defined(IPCC)
  31. /** @defgroup IPCC_LL IPCC
  32. * @{
  33. */
  34. /* Private types -------------------------------------------------------------*/
  35. /* Private variables ---------------------------------------------------------*/
  36. /* Private constants ---------------------------------------------------------*/
  37. /* Private macros ------------------------------------------------------------*/
  38. /* Exported types ------------------------------------------------------------*/
  39. /* Exported constants --------------------------------------------------------*/
  40. /** @defgroup IPCC_LL_Exported_Constants IPCC Exported Constants
  41. * @{
  42. */
  43. /** @defgroup IPCC_LL_EC_GET_FLAG Get Flags Defines
  44. * @brief Flags defines which can be used with LL_IPCC_ReadReg function
  45. * @{
  46. */
  47. #define LL_IPCC_C1TOC2SR_CH1F IPCC_C1TOC2SR_CH1F_Msk /*!< C1 transmit to C2 receive Channel1 status flag before masking */
  48. #define LL_IPCC_C1TOC2SR_CH2F IPCC_C1TOC2SR_CH2F_Msk /*!< C1 transmit to C2 receive Channel2 status flag before masking */
  49. #define LL_IPCC_C1TOC2SR_CH3F IPCC_C1TOC2SR_CH3F_Msk /*!< C1 transmit to C2 receive Channel3 status flag before masking */
  50. #define LL_IPCC_C1TOC2SR_CH4F IPCC_C1TOC2SR_CH4F_Msk /*!< C1 transmit to C2 receive Channel4 status flag before masking */
  51. #define LL_IPCC_C1TOC2SR_CH5F IPCC_C1TOC2SR_CH5F_Msk /*!< C1 transmit to C2 receive Channel5 status flag before masking */
  52. #define LL_IPCC_C1TOC2SR_CH6F IPCC_C1TOC2SR_CH6F_Msk /*!< C1 transmit to C2 receive Channel6 status flag before masking */
  53. #define LL_IPCC_C2TOC1SR_CH1F IPCC_C2TOC1SR_CH1F_Msk /*!< C2 transmit to C1 receive Channel1 status flag before masking */
  54. #define LL_IPCC_C2TOC1SR_CH2F IPCC_C2TOC1SR_CH2F_Msk /*!< C2 transmit to C1 receive Channel2 status flag before masking */
  55. #define LL_IPCC_C2TOC1SR_CH3F IPCC_C2TOC1SR_CH3F_Msk /*!< C2 transmit to C1 receive Channel3 status flag before masking */
  56. #define LL_IPCC_C2TOC1SR_CH4F IPCC_C2TOC1SR_CH4F_Msk /*!< C2 transmit to C1 receive Channel4 status flag before masking */
  57. #define LL_IPCC_C2TOC1SR_CH5F IPCC_C2TOC1SR_CH5F_Msk /*!< C2 transmit to C1 receive Channel5 status flag before masking */
  58. #define LL_IPCC_C2TOC1SR_CH6F IPCC_C2TOC1SR_CH6F_Msk /*!< C2 transmit to C1 receive Channel6 status flag before masking */
  59. /**
  60. * @}
  61. */
  62. /** @defgroup IPCC_LL_EC_Channel Channel
  63. * @{
  64. */
  65. #define LL_IPCC_CHANNEL_1 (0x00000001U) /*!< IPCC Channel 1 */
  66. #define LL_IPCC_CHANNEL_2 (0x00000002U) /*!< IPCC Channel 2 */
  67. #define LL_IPCC_CHANNEL_3 (0x00000004U) /*!< IPCC Channel 3 */
  68. #define LL_IPCC_CHANNEL_4 (0x00000008U) /*!< IPCC Channel 4 */
  69. #define LL_IPCC_CHANNEL_5 (0x00000010U) /*!< IPCC Channel 5 */
  70. #define LL_IPCC_CHANNEL_6 (0x00000020U) /*!< IPCC Channel 6 */
  71. /**
  72. * @}
  73. */
  74. /**
  75. * @}
  76. */
  77. /* Exported macro ------------------------------------------------------------*/
  78. /** @defgroup IPCC_LL_Exported_Macros IPCC Exported Macros
  79. * @{
  80. */
  81. /** @defgroup IPCC_LL_EM_WRITE_READ Common Write and read registers Macros
  82. * @{
  83. */
  84. /**
  85. * @brief Write a value in IPCC register
  86. * @param __INSTANCE__ IPCC Instance
  87. * @param __REG__ Register to be written
  88. * @param __VALUE__ Value to be written in the register
  89. * @retval None
  90. */
  91. #define LL_IPCC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
  92. /**
  93. * @brief Read a value in IPCC register
  94. * @param __INSTANCE__ IPCC Instance
  95. * @param __REG__ Register to be read
  96. * @retval Register value
  97. */
  98. #define LL_IPCC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
  99. /**
  100. * @}
  101. */
  102. /**
  103. * @}
  104. */
  105. /* Exported functions --------------------------------------------------------*/
  106. /** @defgroup IPCC_LL_Exported_Functions IPCC Exported Functions
  107. * @{
  108. */
  109. /** @defgroup IPCC_LL_EF_IT_Management IT_Management
  110. * @{
  111. */
  112. /**
  113. * @brief Enable Transmit channel free interrupt for processor 1.
  114. * @rmtoll C1CR TXFIE LL_C1_IPCC_EnableIT_TXF
  115. * @param IPCCx IPCC Instance.
  116. * @retval None
  117. */
  118. __STATIC_INLINE void LL_C1_IPCC_EnableIT_TXF(IPCC_TypeDef *IPCCx)
  119. {
  120. SET_BIT(IPCCx->C1CR, IPCC_C1CR_TXFIE);
  121. }
  122. /**
  123. * @brief Disable Transmit channel free interrupt for processor 1.
  124. * @rmtoll C1CR TXFIE LL_C1_IPCC_DisableIT_TXF
  125. * @param IPCCx IPCC Instance.
  126. * @retval None
  127. */
  128. __STATIC_INLINE void LL_C1_IPCC_DisableIT_TXF(IPCC_TypeDef *IPCCx)
  129. {
  130. CLEAR_BIT(IPCCx->C1CR, IPCC_C1CR_TXFIE);
  131. }
  132. /**
  133. * @brief Check if Transmit channel free interrupt for processor 1 is enabled.
  134. * @rmtoll C1CR TXFIE LL_C1_IPCC_IsEnabledIT_TXF
  135. * @param IPCCx IPCC Instance.
  136. * @retval State of bit (1 or 0).
  137. */
  138. __STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledIT_TXF(IPCC_TypeDef const *const IPCCx)
  139. {
  140. return ((READ_BIT(IPCCx->C1CR, IPCC_C1CR_TXFIE) == (IPCC_C1CR_TXFIE)) ? 1UL : 0UL);
  141. }
  142. /**
  143. * @brief Enable Receive channel occupied interrupt for processor 1.
  144. * @rmtoll C1CR RXOIE LL_C1_IPCC_EnableIT_RXO
  145. * @param IPCCx IPCC Instance.
  146. * @retval None
  147. */
  148. __STATIC_INLINE void LL_C1_IPCC_EnableIT_RXO(IPCC_TypeDef *IPCCx)
  149. {
  150. SET_BIT(IPCCx->C1CR, IPCC_C1CR_RXOIE);
  151. }
  152. /**
  153. * @brief Disable Receive channel occupied interrupt for processor 1.
  154. * @rmtoll C1CR RXOIE LL_C1_IPCC_DisableIT_RXO
  155. * @param IPCCx IPCC Instance.
  156. * @retval None
  157. */
  158. __STATIC_INLINE void LL_C1_IPCC_DisableIT_RXO(IPCC_TypeDef *IPCCx)
  159. {
  160. CLEAR_BIT(IPCCx->C1CR, IPCC_C1CR_RXOIE);
  161. }
  162. /**
  163. * @brief Check if Receive channel occupied interrupt for processor 1 is enabled.
  164. * @rmtoll C1CR RXOIE LL_C1_IPCC_IsEnabledIT_RXO
  165. * @param IPCCx IPCC Instance.
  166. * @retval State of bit (1 or 0).
  167. */
  168. __STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledIT_RXO(IPCC_TypeDef const *const IPCCx)
  169. {
  170. return ((READ_BIT(IPCCx->C1CR, IPCC_C1CR_RXOIE) == (IPCC_C1CR_RXOIE)) ? 1UL : 0UL);
  171. }
  172. /**
  173. * @brief Enable Transmit channel free interrupt for processor 2.
  174. * @rmtoll C2CR TXFIE LL_C2_IPCC_EnableIT_TXF
  175. * @param IPCCx IPCC Instance.
  176. * @retval None
  177. */
  178. __STATIC_INLINE void LL_C2_IPCC_EnableIT_TXF(IPCC_TypeDef *IPCCx)
  179. {
  180. SET_BIT(IPCCx->C2CR, IPCC_C2CR_TXFIE);
  181. }
  182. /**
  183. * @brief Disable Transmit channel free interrupt for processor 2.
  184. * @rmtoll C2CR TXFIE LL_C2_IPCC_DisableIT_TXF
  185. * @param IPCCx IPCC Instance.
  186. * @retval None
  187. */
  188. __STATIC_INLINE void LL_C2_IPCC_DisableIT_TXF(IPCC_TypeDef *IPCCx)
  189. {
  190. CLEAR_BIT(IPCCx->C2CR, IPCC_C2CR_TXFIE);
  191. }
  192. /**
  193. * @brief Check if Transmit channel free interrupt for processor 2 is enabled.
  194. * @rmtoll C2CR TXFIE LL_C2_IPCC_IsEnabledIT_TXF
  195. * @param IPCCx IPCC Instance.
  196. * @retval State of bit (1 or 0).
  197. */
  198. __STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledIT_TXF(IPCC_TypeDef const *const IPCCx)
  199. {
  200. return ((READ_BIT(IPCCx->C2CR, IPCC_C2CR_TXFIE) == (IPCC_C2CR_TXFIE)) ? 1UL : 0UL);
  201. }
  202. /**
  203. * @brief Enable Receive channel occupied interrupt for processor 2.
  204. * @rmtoll C2CR RXOIE LL_C2_IPCC_EnableIT_RXO
  205. * @param IPCCx IPCC Instance.
  206. * @retval None
  207. */
  208. __STATIC_INLINE void LL_C2_IPCC_EnableIT_RXO(IPCC_TypeDef *IPCCx)
  209. {
  210. SET_BIT(IPCCx->C2CR, IPCC_C2CR_RXOIE);
  211. }
  212. /**
  213. * @brief Disable Receive channel occupied interrupt for processor 2.
  214. * @rmtoll C2CR RXOIE LL_C2_IPCC_DisableIT_RXO
  215. * @param IPCCx IPCC Instance.
  216. * @retval None
  217. */
  218. __STATIC_INLINE void LL_C2_IPCC_DisableIT_RXO(IPCC_TypeDef *IPCCx)
  219. {
  220. CLEAR_BIT(IPCCx->C2CR, IPCC_C2CR_RXOIE);
  221. }
  222. /**
  223. * @brief Check if Receive channel occupied interrupt for processor 2 is enabled.
  224. * @rmtoll C2CR RXOIE LL_C2_IPCC_IsEnabledIT_RXO
  225. * @param IPCCx IPCC Instance.
  226. * @retval State of bit (1 or 0).
  227. */
  228. __STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledIT_RXO(IPCC_TypeDef const *const IPCCx)
  229. {
  230. return ((READ_BIT(IPCCx->C2CR, IPCC_C2CR_RXOIE) == (IPCC_C2CR_RXOIE)) ? 1UL : 0UL);
  231. }
  232. /**
  233. * @}
  234. */
  235. /** @defgroup IPCC_LL_EF_Configuration Configuration
  236. * @{
  237. */
  238. /**
  239. * @brief Unmask transmit channel free interrupt for processor 1.
  240. * @rmtoll C1MR CH1FM LL_C1_IPCC_EnableTransmitChannel\n
  241. * C1MR CH2FM LL_C1_IPCC_EnableTransmitChannel\n
  242. * C1MR CH3FM LL_C1_IPCC_EnableTransmitChannel\n
  243. * C1MR CH4FM LL_C1_IPCC_EnableTransmitChannel\n
  244. * C1MR CH5FM LL_C1_IPCC_EnableTransmitChannel\n
  245. * C1MR CH6FM LL_C1_IPCC_EnableTransmitChannel
  246. * @param IPCCx IPCC Instance.
  247. * @param Channel This parameter can be a combination of the following values:
  248. * @arg @ref LL_IPCC_CHANNEL_1
  249. * @arg @ref LL_IPCC_CHANNEL_2
  250. * @arg @ref LL_IPCC_CHANNEL_3
  251. * @arg @ref LL_IPCC_CHANNEL_4
  252. * @arg @ref LL_IPCC_CHANNEL_5
  253. * @arg @ref LL_IPCC_CHANNEL_6
  254. * @retval None
  255. */
  256. __STATIC_INLINE void LL_C1_IPCC_EnableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  257. {
  258. CLEAR_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos);
  259. }
  260. /**
  261. * @brief Mask transmit channel free interrupt for processor 1.
  262. * @rmtoll C1MR CH1FM LL_C1_IPCC_DisableTransmitChannel\n
  263. * C1MR CH2FM LL_C1_IPCC_DisableTransmitChannel\n
  264. * C1MR CH3FM LL_C1_IPCC_DisableTransmitChannel\n
  265. * C1MR CH4FM LL_C1_IPCC_DisableTransmitChannel\n
  266. * C1MR CH5FM LL_C1_IPCC_DisableTransmitChannel\n
  267. * C1MR CH6FM LL_C1_IPCC_DisableTransmitChannel
  268. * @param IPCCx IPCC Instance.
  269. * @param Channel This parameter can be a combination of the following values:
  270. * @arg @ref LL_IPCC_CHANNEL_1
  271. * @arg @ref LL_IPCC_CHANNEL_2
  272. * @arg @ref LL_IPCC_CHANNEL_3
  273. * @arg @ref LL_IPCC_CHANNEL_4
  274. * @arg @ref LL_IPCC_CHANNEL_5
  275. * @arg @ref LL_IPCC_CHANNEL_6
  276. * @retval None
  277. */
  278. __STATIC_INLINE void LL_C1_IPCC_DisableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  279. {
  280. SET_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos);
  281. }
  282. /**
  283. * @brief Check if Transmit channel free interrupt for processor 1 is masked.
  284. * @rmtoll C1MR CH1FM LL_C1_IPCC_IsEnabledTransmitChannel\n
  285. * C1MR CH2FM LL_C1_IPCC_IsEnabledTransmitChannel\n
  286. * C1MR CH3FM LL_C1_IPCC_IsEnabledTransmitChannel\n
  287. * C1MR CH4FM LL_C1_IPCC_IsEnabledTransmitChannel\n
  288. * C1MR CH5FM LL_C1_IPCC_IsEnabledTransmitChannel\n
  289. * C1MR CH6FM LL_C1_IPCC_IsEnabledTransmitChannel
  290. * @param IPCCx IPCC Instance.
  291. * @param Channel This parameter can be one of the following values:
  292. * @arg @ref LL_IPCC_CHANNEL_1
  293. * @arg @ref LL_IPCC_CHANNEL_2
  294. * @arg @ref LL_IPCC_CHANNEL_3
  295. * @arg @ref LL_IPCC_CHANNEL_4
  296. * @arg @ref LL_IPCC_CHANNEL_5
  297. * @arg @ref LL_IPCC_CHANNEL_6
  298. * @retval State of bit (1 or 0).
  299. */
  300. __STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledTransmitChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel)
  301. {
  302. return ((READ_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos) != (Channel << IPCC_C1MR_CH1FM_Pos)) ? 1UL : 0UL);
  303. }
  304. /**
  305. * @brief Unmask receive channel occupied interrupt for processor 1.
  306. * @rmtoll C1MR CH1OM LL_C1_IPCC_EnableReceiveChannel\n
  307. * C1MR CH2OM LL_C1_IPCC_EnableReceiveChannel\n
  308. * C1MR CH3OM LL_C1_IPCC_EnableReceiveChannel\n
  309. * C1MR CH4OM LL_C1_IPCC_EnableReceiveChannel\n
  310. * C1MR CH5OM LL_C1_IPCC_EnableReceiveChannel\n
  311. * C1MR CH6OM LL_C1_IPCC_EnableReceiveChannel
  312. * @param IPCCx IPCC Instance.
  313. * @param Channel This parameter can be a combination of the following values:
  314. * @arg @ref LL_IPCC_CHANNEL_1
  315. * @arg @ref LL_IPCC_CHANNEL_2
  316. * @arg @ref LL_IPCC_CHANNEL_3
  317. * @arg @ref LL_IPCC_CHANNEL_4
  318. * @arg @ref LL_IPCC_CHANNEL_5
  319. * @arg @ref LL_IPCC_CHANNEL_6
  320. * @retval None
  321. */
  322. __STATIC_INLINE void LL_C1_IPCC_EnableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  323. {
  324. CLEAR_BIT(IPCCx->C1MR, Channel);
  325. }
  326. /**
  327. * @brief Mask receive channel occupied interrupt for processor 1.
  328. * @rmtoll C1MR CH1OM LL_C1_IPCC_DisableReceiveChannel\n
  329. * C1MR CH2OM LL_C1_IPCC_DisableReceiveChannel\n
  330. * C1MR CH3OM LL_C1_IPCC_DisableReceiveChannel\n
  331. * C1MR CH4OM LL_C1_IPCC_DisableReceiveChannel\n
  332. * C1MR CH5OM LL_C1_IPCC_DisableReceiveChannel\n
  333. * C1MR CH6OM LL_C1_IPCC_DisableReceiveChannel
  334. * @param IPCCx IPCC Instance.
  335. * @param Channel This parameter can be a combination of the following values:
  336. * @arg @ref LL_IPCC_CHANNEL_1
  337. * @arg @ref LL_IPCC_CHANNEL_2
  338. * @arg @ref LL_IPCC_CHANNEL_3
  339. * @arg @ref LL_IPCC_CHANNEL_4
  340. * @arg @ref LL_IPCC_CHANNEL_5
  341. * @arg @ref LL_IPCC_CHANNEL_6
  342. * @retval None
  343. */
  344. __STATIC_INLINE void LL_C1_IPCC_DisableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  345. {
  346. SET_BIT(IPCCx->C1MR, Channel);
  347. }
  348. /**
  349. * @brief Check if Receive channel occupied interrupt for processor 1 is masked.
  350. * @rmtoll C1MR CH1OM LL_C1_IPCC_IsEnabledReceiveChannel\n
  351. * C1MR CH2OM LL_C1_IPCC_IsEnabledReceiveChannel\n
  352. * C1MR CH3OM LL_C1_IPCC_IsEnabledReceiveChannel\n
  353. * C1MR CH4OM LL_C1_IPCC_IsEnabledReceiveChannel\n
  354. * C1MR CH5OM LL_C1_IPCC_IsEnabledReceiveChannel\n
  355. * C1MR CH6OM LL_C1_IPCC_IsEnabledReceiveChannel
  356. * @param IPCCx IPCC Instance.
  357. * @param Channel This parameter can be one of the following values:
  358. * @arg @ref LL_IPCC_CHANNEL_1
  359. * @arg @ref LL_IPCC_CHANNEL_2
  360. * @arg @ref LL_IPCC_CHANNEL_3
  361. * @arg @ref LL_IPCC_CHANNEL_4
  362. * @arg @ref LL_IPCC_CHANNEL_5
  363. * @arg @ref LL_IPCC_CHANNEL_6
  364. * @retval State of bit (1 or 0).
  365. */
  366. __STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledReceiveChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel)
  367. {
  368. return ((READ_BIT(IPCCx->C1MR, Channel) != (Channel)) ? 1UL : 0UL);
  369. }
  370. /**
  371. * @brief Unmask transmit channel free interrupt for processor 2.
  372. * @rmtoll C2MR CH1FM LL_C2_IPCC_EnableTransmitChannel\n
  373. * C2MR CH2FM LL_C2_IPCC_EnableTransmitChannel\n
  374. * C2MR CH3FM LL_C2_IPCC_EnableTransmitChannel\n
  375. * C2MR CH4FM LL_C2_IPCC_EnableTransmitChannel\n
  376. * C2MR CH5FM LL_C2_IPCC_EnableTransmitChannel\n
  377. * C2MR CH6FM LL_C2_IPCC_EnableTransmitChannel
  378. * @param IPCCx IPCC Instance.
  379. * @param Channel This parameter can be a combination of the following values:
  380. * @arg @ref LL_IPCC_CHANNEL_1
  381. * @arg @ref LL_IPCC_CHANNEL_2
  382. * @arg @ref LL_IPCC_CHANNEL_3
  383. * @arg @ref LL_IPCC_CHANNEL_4
  384. * @arg @ref LL_IPCC_CHANNEL_5
  385. * @arg @ref LL_IPCC_CHANNEL_6
  386. * @retval None
  387. */
  388. __STATIC_INLINE void LL_C2_IPCC_EnableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  389. {
  390. CLEAR_BIT(IPCCx->C2MR, Channel << IPCC_C2MR_CH1FM_Pos);
  391. }
  392. /**
  393. * @brief Mask transmit channel free interrupt for processor 2.
  394. * @rmtoll C2MR CH1FM LL_C2_IPCC_DisableTransmitChannel\n
  395. * C2MR CH2FM LL_C2_IPCC_DisableTransmitChannel\n
  396. * C2MR CH3FM LL_C2_IPCC_DisableTransmitChannel\n
  397. * C2MR CH4FM LL_C2_IPCC_DisableTransmitChannel\n
  398. * C2MR CH5FM LL_C2_IPCC_DisableTransmitChannel\n
  399. * C2MR CH6FM LL_C2_IPCC_DisableTransmitChannel
  400. * @param IPCCx IPCC Instance.
  401. * @param Channel This parameter can be a combination of the following values:
  402. * @arg @ref LL_IPCC_CHANNEL_1
  403. * @arg @ref LL_IPCC_CHANNEL_2
  404. * @arg @ref LL_IPCC_CHANNEL_3
  405. * @arg @ref LL_IPCC_CHANNEL_4
  406. * @arg @ref LL_IPCC_CHANNEL_5
  407. * @arg @ref LL_IPCC_CHANNEL_6
  408. * @retval None
  409. */
  410. __STATIC_INLINE void LL_C2_IPCC_DisableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  411. {
  412. SET_BIT(IPCCx->C2MR, Channel << (IPCC_C2MR_CH1FM_Pos));
  413. }
  414. /**
  415. * @brief Check if Transmit channel free interrupt for processor 2 is masked.
  416. * @rmtoll C2MR CH1FM LL_C2_IPCC_IsEnabledTransmitChannel\n
  417. * C2MR CH2FM LL_C2_IPCC_IsEnabledTransmitChannel\n
  418. * C2MR CH3FM LL_C2_IPCC_IsEnabledTransmitChannel\n
  419. * C2MR CH4FM LL_C2_IPCC_IsEnabledTransmitChannel\n
  420. * C2MR CH5FM LL_C2_IPCC_IsEnabledTransmitChannel\n
  421. * C2MR CH6FM LL_C2_IPCC_IsEnabledTransmitChannel
  422. * @param IPCCx IPCC Instance.
  423. * @param Channel This parameter can be one of the following values:
  424. * @arg @ref LL_IPCC_CHANNEL_1
  425. * @arg @ref LL_IPCC_CHANNEL_2
  426. * @arg @ref LL_IPCC_CHANNEL_3
  427. * @arg @ref LL_IPCC_CHANNEL_4
  428. * @arg @ref LL_IPCC_CHANNEL_5
  429. * @arg @ref LL_IPCC_CHANNEL_6
  430. * @retval State of bit (1 or 0).
  431. */
  432. __STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledTransmitChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel)
  433. {
  434. return ((READ_BIT(IPCCx->C2MR, Channel << IPCC_C2MR_CH1FM_Pos) != (Channel << IPCC_C2MR_CH1FM_Pos)) ? 1UL : 0UL);
  435. }
  436. /**
  437. * @brief Unmask receive channel occupied interrupt for processor 2.
  438. * @rmtoll C2MR CH1OM LL_C2_IPCC_EnableReceiveChannel\n
  439. * C2MR CH2OM LL_C2_IPCC_EnableReceiveChannel\n
  440. * C2MR CH3OM LL_C2_IPCC_EnableReceiveChannel\n
  441. * C2MR CH4OM LL_C2_IPCC_EnableReceiveChannel\n
  442. * C2MR CH5OM LL_C2_IPCC_EnableReceiveChannel\n
  443. * C2MR CH6OM LL_C2_IPCC_EnableReceiveChannel
  444. * @param IPCCx IPCC Instance.
  445. * @param Channel This parameter can be a combination of the following values:
  446. * @arg @ref LL_IPCC_CHANNEL_1
  447. * @arg @ref LL_IPCC_CHANNEL_2
  448. * @arg @ref LL_IPCC_CHANNEL_3
  449. * @arg @ref LL_IPCC_CHANNEL_4
  450. * @arg @ref LL_IPCC_CHANNEL_5
  451. * @arg @ref LL_IPCC_CHANNEL_6
  452. * @retval None
  453. */
  454. __STATIC_INLINE void LL_C2_IPCC_EnableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  455. {
  456. CLEAR_BIT(IPCCx->C2MR, Channel);
  457. }
  458. /**
  459. * @brief Mask receive channel occupied interrupt for processor 1.
  460. * @rmtoll C2MR CH1OM LL_C2_IPCC_DisableReceiveChannel\n
  461. * C2MR CH2OM LL_C2_IPCC_DisableReceiveChannel\n
  462. * C2MR CH3OM LL_C2_IPCC_DisableReceiveChannel\n
  463. * C2MR CH4OM LL_C2_IPCC_DisableReceiveChannel\n
  464. * C2MR CH5OM LL_C2_IPCC_DisableReceiveChannel\n
  465. * C2MR CH6OM LL_C2_IPCC_DisableReceiveChannel
  466. * @param IPCCx IPCC Instance.
  467. * @param Channel This parameter can be a combination of the following values:
  468. * @arg @ref LL_IPCC_CHANNEL_1
  469. * @arg @ref LL_IPCC_CHANNEL_2
  470. * @arg @ref LL_IPCC_CHANNEL_3
  471. * @arg @ref LL_IPCC_CHANNEL_4
  472. * @arg @ref LL_IPCC_CHANNEL_5
  473. * @arg @ref LL_IPCC_CHANNEL_6
  474. * @retval None
  475. */
  476. __STATIC_INLINE void LL_C2_IPCC_DisableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel)
  477. {
  478. SET_BIT(IPCCx->C2MR, Channel);
  479. }
  480. /**
  481. * @brief Check if Receive channel occupied interrupt for processor 2 is masked.
  482. * @rmtoll C2MR CH1OM LL_C2_IPCC_IsEnabledReceiveChannel\n
  483. * C2MR CH2OM LL_C2_IPCC_IsEnabledReceiveChannel\n
  484. * C2MR CH3OM LL_C2_IPCC_IsEnabledReceiveChannel\n
  485. * C2MR CH4OM LL_C2_IPCC_IsEnabledReceiveChannel\n
  486. * C2MR CH5OM LL_C2_IPCC_IsEnabledReceiveChannel\n
  487. * C2MR CH6OM LL_C2_IPCC_IsEnabledReceiveChannel
  488. * @param IPCCx IPCC Instance.
  489. * @param Channel This parameter can be one of the following values:
  490. * @arg @ref LL_IPCC_CHANNEL_1
  491. * @arg @ref LL_IPCC_CHANNEL_2
  492. * @arg @ref LL_IPCC_CHANNEL_3
  493. * @arg @ref LL_IPCC_CHANNEL_4
  494. * @arg @ref LL_IPCC_CHANNEL_5
  495. * @arg @ref LL_IPCC_CHANNEL_6
  496. * @retval State of bit (1 or 0).
  497. */
  498. __STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledReceiveChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel)
  499. {
  500. return ((READ_BIT(IPCCx->C2MR, Channel) != (Channel)) ? 1UL : 0UL);
  501. }
  502. /**
  503. * @}
  504. */
  505. /** @defgroup IPCC_LL_EF_FLAG_Management FLAG_Management
  506. * @{
  507. */
  508. /**
  509. * @brief Clear IPCC receive channel status for processor 1.
  510. * @note Associated with IPCC_C2TOC1SR.CHxF
  511. * @rmtoll C1SCR CH1C LL_C1_IPCC_ClearFlag_CHx\n
  512. * C1SCR CH2C LL_C1_IPCC_ClearFlag_CHx\n
  513. * C1SCR CH3C LL_C1_IPCC_ClearFlag_CHx\n
  514. * C1SCR CH4C LL_C1_IPCC_ClearFlag_CHx\n
  515. * C1SCR CH5C LL_C1_IPCC_ClearFlag_CHx\n
  516. * C1SCR CH6C LL_C1_IPCC_ClearFlag_CHx
  517. * @param IPCCx IPCC Instance.
  518. * @param Channel This parameter can be a combination of the following values:
  519. * @arg @ref LL_IPCC_CHANNEL_1
  520. * @arg @ref LL_IPCC_CHANNEL_2
  521. * @arg @ref LL_IPCC_CHANNEL_3
  522. * @arg @ref LL_IPCC_CHANNEL_4
  523. * @arg @ref LL_IPCC_CHANNEL_5
  524. * @arg @ref LL_IPCC_CHANNEL_6
  525. * @retval None
  526. */
  527. __STATIC_INLINE void LL_C1_IPCC_ClearFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel)
  528. {
  529. WRITE_REG(IPCCx->C1SCR, Channel);
  530. }
  531. /**
  532. * @brief Set IPCC transmit channel status for processor 1.
  533. * @note Associated with IPCC_C1TOC2SR.CHxF
  534. * @rmtoll C1SCR CH1S LL_C1_IPCC_SetFlag_CHx\n
  535. * C1SCR CH2S LL_C1_IPCC_SetFlag_CHx\n
  536. * C1SCR CH3S LL_C1_IPCC_SetFlag_CHx\n
  537. * C1SCR CH4S LL_C1_IPCC_SetFlag_CHx\n
  538. * C1SCR CH5S LL_C1_IPCC_SetFlag_CHx\n
  539. * C1SCR CH6S LL_C1_IPCC_SetFlag_CHx
  540. * @param IPCCx IPCC Instance.
  541. * @param Channel This parameter can be a combination of the following values:
  542. * @arg @ref LL_IPCC_CHANNEL_1
  543. * @arg @ref LL_IPCC_CHANNEL_2
  544. * @arg @ref LL_IPCC_CHANNEL_3
  545. * @arg @ref LL_IPCC_CHANNEL_4
  546. * @arg @ref LL_IPCC_CHANNEL_5
  547. * @arg @ref LL_IPCC_CHANNEL_6
  548. * @retval None
  549. */
  550. __STATIC_INLINE void LL_C1_IPCC_SetFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel)
  551. {
  552. WRITE_REG(IPCCx->C1SCR, Channel << IPCC_C1SCR_CH1S_Pos);
  553. }
  554. /**
  555. * @brief Get channel status for processor 1.
  556. * @rmtoll C1TOC2SR CH1F LL_C1_IPCC_IsActiveFlag_CHx\n
  557. * C1TOC2SR CH2F LL_C1_IPCC_IsActiveFlag_CHx\n
  558. * C1TOC2SR CH3F LL_C1_IPCC_IsActiveFlag_CHx\n
  559. * C1TOC2SR CH4F LL_C1_IPCC_IsActiveFlag_CHx\n
  560. * C1TOC2SR CH5F LL_C1_IPCC_IsActiveFlag_CHx\n
  561. * C1TOC2SR CH6F LL_C1_IPCC_IsActiveFlag_CHx
  562. * @param IPCCx IPCC Instance.
  563. * @param Channel This parameter can be one of the following values:
  564. * @arg @ref LL_IPCC_CHANNEL_1
  565. * @arg @ref LL_IPCC_CHANNEL_2
  566. * @arg @ref LL_IPCC_CHANNEL_3
  567. * @arg @ref LL_IPCC_CHANNEL_4
  568. * @arg @ref LL_IPCC_CHANNEL_5
  569. * @arg @ref LL_IPCC_CHANNEL_6
  570. * @retval State of bit (1 or 0).
  571. */
  572. __STATIC_INLINE uint32_t LL_C1_IPCC_IsActiveFlag_CHx(IPCC_TypeDef const *const IPCCx, uint32_t Channel)
  573. {
  574. return ((READ_BIT(IPCCx->C1TOC2SR, Channel) == (Channel)) ? 1UL : 0UL);
  575. }
  576. /**
  577. * @brief Clear IPCC receive channel status for processor 2.
  578. * @note Associated with IPCC_C1TOC2SR.CHxF
  579. * @rmtoll C2SCR CH1C LL_C2_IPCC_ClearFlag_CHx\n
  580. * C2SCR CH2C LL_C2_IPCC_ClearFlag_CHx\n
  581. * C2SCR CH3C LL_C2_IPCC_ClearFlag_CHx\n
  582. * C2SCR CH4C LL_C2_IPCC_ClearFlag_CHx\n
  583. * C2SCR CH5C LL_C2_IPCC_ClearFlag_CHx\n
  584. * C2SCR CH6C LL_C2_IPCC_ClearFlag_CHx
  585. * @param IPCCx IPCC Instance.
  586. * @param Channel This parameter can be a combination of the following values:
  587. * @arg @ref LL_IPCC_CHANNEL_1
  588. * @arg @ref LL_IPCC_CHANNEL_2
  589. * @arg @ref LL_IPCC_CHANNEL_3
  590. * @arg @ref LL_IPCC_CHANNEL_4
  591. * @arg @ref LL_IPCC_CHANNEL_5
  592. * @arg @ref LL_IPCC_CHANNEL_6
  593. * @retval None
  594. */
  595. __STATIC_INLINE void LL_C2_IPCC_ClearFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel)
  596. {
  597. WRITE_REG(IPCCx->C2SCR, Channel);
  598. }
  599. /**
  600. * @brief Set IPCC transmit channel status for processor 2.
  601. * @note Associated with IPCC_C2TOC1SR.CHxF
  602. * @rmtoll C2SCR CH1S LL_C2_IPCC_SetFlag_CHx\n
  603. * C2SCR CH2S LL_C2_IPCC_SetFlag_CHx\n
  604. * C2SCR CH3S LL_C2_IPCC_SetFlag_CHx\n
  605. * C2SCR CH4S LL_C2_IPCC_SetFlag_CHx\n
  606. * C2SCR CH5S LL_C2_IPCC_SetFlag_CHx\n
  607. * C2SCR CH6S LL_C2_IPCC_SetFlag_CHx
  608. * @param IPCCx IPCC Instance.
  609. * @param Channel This parameter can be a combination of the following values:
  610. * @arg @ref LL_IPCC_CHANNEL_1
  611. * @arg @ref LL_IPCC_CHANNEL_2
  612. * @arg @ref LL_IPCC_CHANNEL_3
  613. * @arg @ref LL_IPCC_CHANNEL_4
  614. * @arg @ref LL_IPCC_CHANNEL_5
  615. * @arg @ref LL_IPCC_CHANNEL_6
  616. * @retval None
  617. */
  618. __STATIC_INLINE void LL_C2_IPCC_SetFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel)
  619. {
  620. WRITE_REG(IPCCx->C2SCR, Channel << IPCC_C2SCR_CH1S_Pos);
  621. }
  622. /**
  623. * @brief Get channel status for processor 2.
  624. * @rmtoll C2TOC1SR CH1F LL_C2_IPCC_IsActiveFlag_CHx\n
  625. * C2TOC1SR CH2F LL_C2_IPCC_IsActiveFlag_CHx\n
  626. * C2TOC1SR CH3F LL_C2_IPCC_IsActiveFlag_CHx\n
  627. * C2TOC1SR CH4F LL_C2_IPCC_IsActiveFlag_CHx\n
  628. * C2TOC1SR CH5F LL_C2_IPCC_IsActiveFlag_CHx\n
  629. * C2TOC1SR CH6F LL_C2_IPCC_IsActiveFlag_CHx
  630. * @param IPCCx IPCC Instance.
  631. * @param Channel This parameter can be one of the following values:
  632. * @arg @ref LL_IPCC_CHANNEL_1
  633. * @arg @ref LL_IPCC_CHANNEL_2
  634. * @arg @ref LL_IPCC_CHANNEL_3
  635. * @arg @ref LL_IPCC_CHANNEL_4
  636. * @arg @ref LL_IPCC_CHANNEL_5
  637. * @arg @ref LL_IPCC_CHANNEL_6
  638. * @retval State of bit (1 or 0).
  639. */
  640. __STATIC_INLINE uint32_t LL_C2_IPCC_IsActiveFlag_CHx(IPCC_TypeDef const *const IPCCx, uint32_t Channel)
  641. {
  642. return ((READ_BIT(IPCCx->C2TOC1SR, Channel) == (Channel)) ? 1UL : 0UL);
  643. }
  644. /**
  645. * @}
  646. */
  647. /**
  648. * @}
  649. */
  650. /**
  651. * @}
  652. */
  653. #endif /* defined(IPCC) */
  654. /**
  655. * @}
  656. */
  657. #ifdef __cplusplus
  658. }
  659. #endif
  660. #endif /* STM32WBxx_LL_IPCC_H */
  661. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/