fsl_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
3  * Copyright 2016-2020 NXP
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _FSL_COMMON_H_
10 #define _FSL_COMMON_H_
11 
12 #include <assert.h>
13 #include <stdbool.h>
14 #include <stdint.h>
15 #include <string.h>
16 #include <stdlib.h>
17 
18 #if defined(__ICCARM__)
19 #include <stddef.h>
20 #endif
21 
22 /*
23  * For CMSIS pack RTE.
24  * CMSIS pack RTE generates "RTC_Components.h" which contains the statements
25  * of the related <RTE_Components_h> element for all selected software components.
26  */
27 #ifdef _RTE_
28 #include "RTE_Components.h"
29 #endif
30 
31 #include "fsl_device_registers.h"
32 
38 /*******************************************************************************
39  * Definitions
40  ******************************************************************************/
41 
43 #define MAKE_STATUS(group, code) ((((group)*100) + (code)))
44 
46 #define MAKE_VERSION(major, minor, bugfix) (((major) << 16) | ((minor) << 8) | (bugfix))
47 
51 #define FSL_COMMON_DRIVER_VERSION (MAKE_VERSION(2, 2, 4))
52 
54 /* Debug console type definition. */
55 #define DEBUG_CONSOLE_DEVICE_TYPE_NONE 0U
56 #define DEBUG_CONSOLE_DEVICE_TYPE_UART 1U
57 #define DEBUG_CONSOLE_DEVICE_TYPE_LPUART 2U
58 #define DEBUG_CONSOLE_DEVICE_TYPE_LPSCI 3U
59 #define DEBUG_CONSOLE_DEVICE_TYPE_USBCDC 4U
60 #define DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM 5U
61 #define DEBUG_CONSOLE_DEVICE_TYPE_IUART 6U
62 #define DEBUG_CONSOLE_DEVICE_TYPE_VUSART 7U
63 #define DEBUG_CONSOLE_DEVICE_TYPE_MINI_USART 8U
64 #define DEBUG_CONSOLE_DEVICE_TYPE_SWO 9U
67 enum _status_groups
68 {
172 };
173 
177 enum
178 {
186 };
187 
189 typedef int32_t status_t;
190 
191 /*
192  * Macro guard for whether to use default weak IRQ implementation in drivers
193  */
194 #ifndef FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ
195 #define FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ 1
196 #endif
197 
199 /* @{ */
200 #if !defined(MIN)
201 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
202 #endif
203 
204 #if !defined(MAX)
205 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
206 #endif
207 /* @} */
208 
210 #if !defined(ARRAY_SIZE)
211 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
212 #endif
213 
215 /* @{ */
216 #if !defined(UINT16_MAX)
217 #define UINT16_MAX ((uint16_t)-1)
218 #endif
219 
220 #if !defined(UINT32_MAX)
221 #define UINT32_MAX ((uint32_t)-1)
222 #endif
223 /* @} */
224 
226 /* @{ */
228 #define USEC_TO_COUNT(us, clockFreqInHz) (uint64_t)(((uint64_t)(us) * (clockFreqInHz)) / 1000000U)
229 
230 #define COUNT_TO_USEC(count, clockFreqInHz) (uint64_t)((uint64_t)(count) * 1000000U / (clockFreqInHz))
231 
233 #define MSEC_TO_COUNT(ms, clockFreqInHz) (uint64_t)((uint64_t)(ms) * (clockFreqInHz) / 1000U)
234 
235 #define COUNT_TO_MSEC(count, clockFreqInHz) (uint64_t)((uint64_t)(count) * 1000U / (clockFreqInHz))
236 /* @} */
237 
247 #if (defined __CORTEX_M) && ((__CORTEX_M == 4U) || (__CORTEX_M == 7U))
248 #define SDK_ISR_EXIT_BARRIER __DSB()
249 #else
250 #define SDK_ISR_EXIT_BARRIER
251 #endif
252 
253 /* @} */
254 
256 /* @{ */
257 #if (defined(__ICCARM__))
258 
262 _Pragma("diag_suppress=Pm120")
263 #define SDK_PRAGMA(x) _Pragma(#x)
264  _Pragma("diag_error=Pm120")
266 #define SDK_ALIGN(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var
267 
268 #if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
269 #define SDK_L1DCACHE_ALIGN(var) SDK_PRAGMA(data_alignment = FSL_FEATURE_L1DCACHE_LINESIZE_BYTE) var
270 #endif
271 
272 #if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
273 #define SDK_L2CACHE_ALIGN(var) SDK_PRAGMA(data_alignment = FSL_FEATURE_L2CACHE_LINESIZE_BYTE) var
274 #endif
275 #elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
276 
277 #define SDK_ALIGN(var, alignbytes) __attribute__((aligned(alignbytes))) var
278 
279 #if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
280 #define SDK_L1DCACHE_ALIGN(var) __attribute__((aligned(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE))) var
281 #endif
282 
283 #if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
284 #define SDK_L2CACHE_ALIGN(var) __attribute__((aligned(FSL_FEATURE_L2CACHE_LINESIZE_BYTE))) var
285 #endif
286 #elif defined(__GNUC__)
287 
288 #define SDK_ALIGN(var, alignbytes) var __attribute__((aligned(alignbytes)))
289 
290 #if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
291 #define SDK_L1DCACHE_ALIGN(var) var __attribute__((aligned(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)))
292 #endif
293 
294 #if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
295 #define SDK_L2CACHE_ALIGN(var) var __attribute__((aligned(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)))
296 #endif
297 #else
298 #error Toolchain not supported
299 #define SDK_ALIGN(var, alignbytes) var
300 #if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
301 #define SDK_L1DCACHE_ALIGN(var) var
302 #endif
303 #if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
304 #define SDK_L2CACHE_ALIGN(var) var
305 #endif
306 #endif
307 
309 #define SDK_SIZEALIGN(var, alignbytes) \
310  ((unsigned int)((var) + ((alignbytes)-1U)) & (unsigned int)(~(unsigned int)((alignbytes)-1U)))
311 /* @} */
312 
314 /* For initialized non-zero non-cacheable variables, please using "AT_NONCACHEABLE_SECTION_INIT(var) ={xx};" or
315  * "AT_NONCACHEABLE_SECTION_ALIGN_INIT(var) ={xx};" in your projects to define them, for zero-inited non-cacheable variables,
316  * please using "AT_NONCACHEABLE_SECTION(var);" or "AT_NONCACHEABLE_SECTION_ALIGN(var);" to define them, these zero-inited variables
317  * will be initialized to zero in system startup.
318  */
319 /* @{ */
320 #if (defined(__ICCARM__))
321 #if ((!(defined(FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION) && FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION)) && defined(FSL_FEATURE_L1ICACHE_LINESIZE_BYTE))
322 #define AT_NONCACHEABLE_SECTION(var) var @"NonCacheable"
323 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var @"NonCacheable"
324 #define AT_NONCACHEABLE_SECTION_INIT(var) var @"NonCacheable.init"
325 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var @"NonCacheable.init"
326 #else
327 #define AT_NONCACHEABLE_SECTION(var) var
328 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var
329 #define AT_NONCACHEABLE_SECTION_INIT(var) var
330 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var
331 #endif
332 #elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
333 #if ((!(defined(FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION) && FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION)) && defined(FSL_FEATURE_L1ICACHE_LINESIZE_BYTE))
334 #define AT_NONCACHEABLE_SECTION_INIT(var) __attribute__((section("NonCacheable.init"))) var
335 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) \
336  __attribute__((section("NonCacheable.init"))) __attribute__((aligned(alignbytes))) var
337 #if(defined(__CC_ARM))
338 #define AT_NONCACHEABLE_SECTION(var) __attribute__((section("NonCacheable"), zero_init)) var
339 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) \
340  __attribute__((section("NonCacheable"), zero_init)) __attribute__((aligned(alignbytes))) var
341 #else
342 #define AT_NONCACHEABLE_SECTION(var) __attribute__((section(".bss.NonCacheable"))) var
343 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) \
344  __attribute__((section(".bss.NonCacheable"))) __attribute__((aligned(alignbytes))) var
345 #endif
346 #else
347 #define AT_NONCACHEABLE_SECTION(var) var
348 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) __attribute__((aligned(alignbytes))) var
349 #define AT_NONCACHEABLE_SECTION_INIT(var) var
350 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) __attribute__((aligned(alignbytes))) var
351 #endif
352 #elif(defined(__XCC__))
353 #define AT_NONCACHEABLE_SECTION_INIT(var) __attribute__((section("NonCacheable.init"))) var
354 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) \
355  __attribute__((section("NonCacheable.init"))) var __attribute__((aligned(alignbytes)))
356 #define AT_NONCACHEABLE_SECTION(var) __attribute__((section("NonCacheable"))) var
357 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) \
358  __attribute__((section("NonCacheable"))) var __attribute__((aligned(alignbytes)))
359 #elif(defined(__GNUC__))
360 /* For GCC, when the non-cacheable section is required, please define "__STARTUP_INITIALIZE_NONCACHEDATA"
361  * in your projects to make sure the non-cacheable section variables will be initialized in system startup.
362  */
363 #if ((!(defined(FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION) && FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION)) && defined(FSL_FEATURE_L1ICACHE_LINESIZE_BYTE))
364 #define AT_NONCACHEABLE_SECTION_INIT(var) __attribute__((section("NonCacheable.init"))) var
365 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) \
366  __attribute__((section("NonCacheable.init"))) var __attribute__((aligned(alignbytes)))
367 #define AT_NONCACHEABLE_SECTION(var) __attribute__((section("NonCacheable,\"aw\",%nobits @"))) var
368 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) \
369  __attribute__((section("NonCacheable,\"aw\",%nobits @"))) var __attribute__((aligned(alignbytes)))
370 #else
371 #define AT_NONCACHEABLE_SECTION(var) var
372 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) var __attribute__((aligned(alignbytes)))
373 #define AT_NONCACHEABLE_SECTION_INIT(var) var
374 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) var __attribute__((aligned(alignbytes)))
375 #endif
376 #else
377 #error Toolchain not supported.
378 #define AT_NONCACHEABLE_SECTION(var) var
379 #define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) var
380 #define AT_NONCACHEABLE_SECTION_INIT(var) var
381 #define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) var
382 #endif
383 /* @} */
384 
386 /* @{ */
387 #if defined(FSL_SDK_DRIVER_QUICK_ACCESS_ENABLE) && FSL_SDK_DRIVER_QUICK_ACCESS_ENABLE
388 #if (defined(__ICCARM__))
389 #define AT_QUICKACCESS_SECTION_CODE(func) func @"CodeQuickAccess"
390 #define AT_QUICKACCESS_SECTION_DATA(func) func @"DataQuickAccess"
391 #elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
392 #define AT_QUICKACCESS_SECTION_CODE(func) __attribute__((section("CodeQuickAccess"), __noinline__)) func
393 #define AT_QUICKACCESS_SECTION_DATA(func) __attribute__((section("DataQuickAccess"))) func
394 #elif(defined(__GNUC__))
395 #define AT_QUICKACCESS_SECTION_CODE(func) __attribute__((section("CodeQuickAccess"), __noinline__)) func
396 #define AT_QUICKACCESS_SECTION_DATA(func) __attribute__((section("DataQuickAccess"))) func
397 #else
398 #error Toolchain not supported.
399 #endif /* defined(__ICCARM__) */
400 #else
401 #if (defined(__ICCARM__))
402 #define AT_QUICKACCESS_SECTION_CODE(func) func
403 #define AT_QUICKACCESS_SECTION_DATA(func) func
404 #elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
405 #define AT_QUICKACCESS_SECTION_CODE(func) func
406 #define AT_QUICKACCESS_SECTION_DATA(func) func
407 #elif(defined(__GNUC__))
408 #define AT_QUICKACCESS_SECTION_CODE(func) func
409 #define AT_QUICKACCESS_SECTION_DATA(func) func
410 #else
411 #error Toolchain not supported.
412 #endif
413 #endif /* __FSL_SDK_DRIVER_QUICK_ACCESS_ENABLE */
414 /* @} */
415 
417 #if (defined(__ICCARM__))
418 #define RAMFUNCTION_SECTION_CODE(func) func @"RamFunction"
419 #elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
420 #define RAMFUNCTION_SECTION_CODE(func) __attribute__((section("RamFunction"))) func
421 #elif(defined(__GNUC__))
422 #define RAMFUNCTION_SECTION_CODE(func) __attribute__((section("RamFunction"))) func
423 #else
424 #error Toolchain not supported.
425 #endif /* defined(__ICCARM__) */
426 /* @} */
427 
429 /* For switch case code block, if case section ends without "break;" statement, there wil be
430  fallthrough warning with compiler flag -Wextra or -Wimplicit-fallthrough=n when using armgcc.
431  To suppress this warning, "SUPPRESS_FALL_THROUGH_WARNING();" need to be added at the end of each
432  case section which misses "break;"statement.
433  */
434 /* @{ */
435 #if defined(__GNUC__) && !defined(__ARMCC_VERSION)
436 #define SUPPRESS_FALL_THROUGH_WARNING() __attribute__ ((fallthrough))
437 #else
438 #define SUPPRESS_FALL_THROUGH_WARNING()
439 #endif
440 /* @} */
441 
442 #if defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
443 void DefaultISR(void);
444 #endif
445 /*
446  * The fsl_clock.h is included here because it needs MAKE_VERSION/MAKE_STATUS/status_t
447  * defined in previous of this file.
448  */
449 #include "fsl_clock.h"
450 
451 /*
452  * Chip level peripheral reset API, for MCUs that implement peripheral reset control external to a peripheral
453  */
454 #if ((defined(FSL_FEATURE_SOC_SYSCON_COUNT) && (FSL_FEATURE_SOC_SYSCON_COUNT > 0)) || \
455  (defined(FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT) && (FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT > 0)))
456 #include "fsl_reset.h"
457 #endif
458 
459 /*******************************************************************************
460  * API
461  ******************************************************************************/
462 
463 #if defined(__cplusplus)
464  extern "C"
465 {
466 #endif
467 
484  static inline status_t EnableIRQ(IRQn_Type interrupt)
485  {
486  if (NotAvail_IRQn == interrupt)
487  {
488  return kStatus_Fail;
489  }
490 
491 #if defined(FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS) && (FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS > 0)
492  if ((uint32_t)interrupt >= (uint32_t)FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS)
493  {
494  return kStatus_Fail;
495  }
496 #endif
497 
498 #if defined(__GIC_PRIO_BITS)
499  GIC_EnableIRQ(interrupt);
500 #else
501  NVIC_EnableIRQ(interrupt);
502 #endif
503  return kStatus_Success;
504  }
505 
522  static inline status_t DisableIRQ(IRQn_Type interrupt)
523  {
524  if (NotAvail_IRQn == interrupt)
525  {
526  return kStatus_Fail;
527  }
528 
529 #if defined(FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS) && (FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS > 0)
530  if ((uint32_t)interrupt >= (uint32_t)FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS)
531  {
532  return kStatus_Fail;
533  }
534 #endif
535 
536 #if defined(__GIC_PRIO_BITS)
537  GIC_DisableIRQ(interrupt);
538 #else
539  NVIC_DisableIRQ(interrupt);
540 #endif
541  return kStatus_Success;
542  }
543 
552  static inline uint32_t DisableGlobalIRQ(void)
553  {
554 #if defined (__XCC__)
555  return 0;
556 #else
557 #if defined(CPSR_I_Msk)
558  uint32_t cpsr = __get_CPSR() & CPSR_I_Msk;
559 
560  __disable_irq();
561 
562  return cpsr;
563 #else
564  uint32_t regPrimask = __get_PRIMASK();
565 
566  __disable_irq();
567 
568  return regPrimask;
569 #endif
570 #endif
571  }
572 
583  static inline void EnableGlobalIRQ(uint32_t primask)
584  {
585 #if defined (__XCC__)
586 #else
587 #if defined(CPSR_I_Msk)
588  __set_CPSR((__get_CPSR() & ~CPSR_I_Msk) | primask);
589 #else
590  __set_PRIMASK(primask);
591 #endif
592 #endif
593  }
594 
595 #if defined(ENABLE_RAM_VECTOR_TABLE)
596 
603  uint32_t InstallIRQHandler(IRQn_Type irq, uint32_t irqHandler);
604 #endif /* ENABLE_RAM_VECTOR_TABLE. */
605 
606 #if (defined(FSL_FEATURE_SOC_SYSCON_COUNT) && (FSL_FEATURE_SOC_SYSCON_COUNT > 0))
607 
620  void EnableDeepSleepIRQ(IRQn_Type interrupt);
621 
635  void DisableDeepSleepIRQ(IRQn_Type interrupt);
636 #endif /* FSL_FEATURE_SOC_SYSCON_COUNT */
637 
647  void *SDK_Malloc(size_t size, size_t alignbytes);
648 
654  void SDK_Free(void *ptr);
655 
664  void SDK_DelayAtLeastUs(uint32_t delay_us, uint32_t coreClock_Hz);
665 
666 #if defined(__cplusplus)
667 }
668 #endif
669 
672 #endif /* _FSL_COMMON_H_ */
NotAvail_IRQn
@ NotAvail_IRQn
Definition: MIMXRT1052.h:80
kStatusGroup_ApplicationRangeStart
@ kStatusGroup_ApplicationRangeStart
Definition: fsl_common.h:140
kStatusGroup_SEMA42
@ kStatusGroup_SEMA42
Definition: fsl_common.h:83
kStatusGroup_I2S
@ kStatusGroup_I2S
Definition: fsl_common.h:94
kStatusGroup_OTP
@ kStatusGroup_OTP
Definition: fsl_common.h:117
kStatusGroup_MIPI_DSI
@ kStatusGroup_MIPI_DSI
Definition: fsl_common.h:97
kStatus_Timeout
@ kStatus_Timeout
Definition: fsl_common.h:184
kStatusGroup_MCG
@ kStatusGroup_MCG
Definition: fsl_common.h:87
kStatus_InvalidArgument
@ kStatus_InvalidArgument
Definition: fsl_common.h:183
kStatusGroup_IUART
@ kStatusGroup_IUART
Definition: fsl_common.h:95
kStatusGroup_LTC
@ kStatusGroup_LTC
Definition: fsl_common.h:110
kStatusGroup_CODEC
@ kStatusGroup_CODEC
Definition: fsl_common.h:167
__get_PRIMASK
__STATIC_INLINE uint32_t __get_PRIMASK(void)
Get Priority Mask.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/cmsis_armcc.h:267
kStatusGroup_PUF
@ kStatusGroup_PUF
Definition: fsl_common.h:144
kStatusGroup_LED
@ kStatusGroup_LED
Definition: fsl_common.h:156
kStatusGroup_COMMON_TASK
@ kStatusGroup_COMMON_TASK
Definition: fsl_common.h:163
kStatusGroup_LPSCI
@ kStatusGroup_LPSCI
Definition: fsl_common.h:79
kStatusGroup_SDHC
@ kStatusGroup_SDHC
Definition: fsl_common.h:84
kStatusGroup_SMARTCARD
@ kStatusGroup_SMARTCARD
Definition: fsl_common.h:103
kStatusGroup_FLEXIO_UART
@ kStatusGroup_FLEXIO_UART
Definition: fsl_common.h:74
kStatusGroup_DMAMGR
@ kStatusGroup_DMAMGR
Definition: fsl_common.h:108
kStatusGroup_HAL_TIMER
@ kStatusGroup_HAL_TIMER
Definition: fsl_common.h:148
kStatusGroup_LPUART
@ kStatusGroup_LPUART
Definition: fsl_common.h:80
kStatusGroup_FLEXIO_MCULCD
@ kStatusGroup_FLEXIO_MCULCD
Definition: fsl_common.h:91
kStatusGroup_CSI
@ kStatusGroup_CSI
Definition: fsl_common.h:96
kStatusGroup_FLEXIO_CAMERA
@ kStatusGroup_FLEXIO_CAMERA
Definition: fsl_common.h:111
kStatus_NoTransferInProgress
@ kStatus_NoTransferInProgress
Definition: fsl_common.h:185
kStatusGroup_ICS
@ kStatusGroup_ICS
Definition: fsl_common.h:130
kStatus_OutOfRange
@ kStatus_OutOfRange
Definition: fsl_common.h:182
kStatusGroup_EDMA
@ kStatusGroup_EDMA
Definition: fsl_common.h:107
__disable_irq
__STATIC_FORCEINLINE void __disable_irq(void)
Disable IRQ Interrupts.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/cmsis_gcc.h:207
kStatusGroup_SDK_FLEXSPINOR
@ kStatusGroup_SDK_FLEXSPINOR
Definition: fsl_common.h:166
kStatusGroup_LPC_MINISPI
@ kStatusGroup_LPC_MINISPI
Definition: fsl_common.h:132
kStatusGroup_SDIOSLV
@ kStatusGroup_SDIOSLV
Definition: fsl_common.h:170
kStatusGroup_FLEXCAN
@ kStatusGroup_FLEXCAN
Definition: fsl_common.h:109
kStatusGroup_TIMERMANAGER
@ kStatusGroup_TIMERMANAGER
Definition: fsl_common.h:154
kStatusGroup_XRDC
@ kStatusGroup_XRDC
Definition: fsl_common.h:82
SDK_DelayAtLeastUs
void SDK_DelayAtLeastUs(uint32_t delay_us, uint32_t coreClock_Hz)
Delay at least for some time. Please note that, this API uses while loop for delay,...
Definition: fsl_common.c:241
kStatusGroup_SDMA
@ kStatusGroup_SDMA
Definition: fsl_common.h:129
kStatusGroup_MEM_MANAGER
@ kStatusGroup_MEM_MANAGER
Definition: fsl_common.h:160
kStatusGroup_SCG
@ kStatusGroup_SCG
Definition: fsl_common.h:88
SDK_Free
void SDK_Free(void *ptr)
Free memory.
Definition: fsl_common.c:137
kStatusGroup_ASRC
@ kStatusGroup_ASRC
Definition: fsl_common.h:168
kStatusGroup_SHELL
@ kStatusGroup_SHELL
Definition: fsl_common.h:159
SDK_Malloc
void * SDK_Malloc(size_t size, size_t alignbytes)
Allocate memory with given alignment and aligned size.
Definition: fsl_common.c:111
kStatusGroup_FLEXIO_I2S
@ kStatusGroup_FLEXIO_I2S
Definition: fsl_common.h:90
kStatus_ReadOnly
@ kStatus_ReadOnly
Definition: fsl_common.h:181
kStatusGroup_I2C
@ kStatusGroup_I2C
Definition: fsl_common.h:78
__set_PRIMASK
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
Set Priority Mask.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/cmsis_armcc.h:279
kStatusGroup_ENET
@ kStatusGroup_ENET
Definition: fsl_common.h:100
kStatusGroup_DebugConsole
@ kStatusGroup_DebugConsole
Definition: fsl_common.h:138
fsl_device_registers.h
kStatusGroup_FLEXCOMM_I2C
@ kStatusGroup_FLEXCOMM_I2C
Definition: fsl_common.h:93
kStatusGroup_OTFAD
@ kStatusGroup_OTFAD
Definition: fsl_common.h:169
kStatusGroup_MCAN
@ kStatusGroup_MCAN
Definition: fsl_common.h:118
kStatusGroup_LPI2C
@ kStatusGroup_LPI2C
Definition: fsl_common.h:76
kStatusGroup_SPC
@ kStatusGroup_SPC
Definition: fsl_common.h:143
kStatusGroup_MSG
@ kStatusGroup_MSG
Definition: fsl_common.h:164
MAKE_STATUS
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:43
kStatusGroup_I3C
@ kStatusGroup_I3C
Definition: fsl_common.h:135
kStatusGroup_DCP
@ kStatusGroup_DCP
Definition: fsl_common.h:123
kStatusGroup_SPIFI
@ kStatusGroup_SPIFI
Definition: fsl_common.h:116
kStatusGroup_MMDC
@ kStatusGroup_MMDC
Definition: fsl_common.h:127
kStatusGroup_HAL_RNG
@ kStatusGroup_HAL_RNG
Definition: fsl_common.h:153
kStatusGroup_HAL_FLASH
@ kStatusGroup_HAL_FLASH
Definition: fsl_common.h:151
kStatusGroup_LMEM
@ kStatusGroup_LMEM
Definition: fsl_common.h:104
kStatusGroup_HASHCRYPT
@ kStatusGroup_HASHCRYPT
Definition: fsl_common.h:133
DisableIRQ
static status_t DisableIRQ(IRQn_Type interrupt)
Disable specific interrupt.
Definition: fsl_common.h:522
kStatusGroup_DMIC
@ kStatusGroup_DMIC
Definition: fsl_common.h:114
kStatusGroup_LIST
@ kStatusGroup_LIST
Definition: fsl_common.h:161
kStatusGroup_FLEXIO_I2C
@ kStatusGroup_FLEXIO_I2C
Definition: fsl_common.h:75
kStatusGroup_OSA
@ kStatusGroup_OSA
Definition: fsl_common.h:162
kStatusGroup_USDHC
@ kStatusGroup_USDHC
Definition: fsl_common.h:121
kStatusGroup_EXTERN_EEPROM
@ kStatusGroup_EXTERN_EEPROM
Definition: fsl_common.h:158
kStatusGroup_HAL_PWM
@ kStatusGroup_HAL_PWM
Definition: fsl_common.h:152
kStatusGroup_ESAI
@ kStatusGroup_ESAI
Definition: fsl_common.h:125
kStatusGroup_NOTIFIER
@ kStatusGroup_NOTIFIER
Definition: fsl_common.h:137
IRQn_Type
IRQn_Type
STM32F4XX Interrupt Number Definition, according to the selected device in Library_configuration_sect...
Definition: stm32f407xx.h:66
kStatusGroup_LPC_SPI_SSP
@ kStatusGroup_LPC_SPI_SSP
Definition: fsl_common.h:134
kStatusGroup_SERIALMANAGER
@ kStatusGroup_SERIALMANAGER
Definition: fsl_common.h:155
kStatusGroup_SDK_OCOTP
@ kStatusGroup_SDK_OCOTP
Definition: fsl_common.h:165
kStatusGroup_BUTTON
@ kStatusGroup_BUTTON
Definition: fsl_common.h:157
kStatus_Fail
@ kStatus_Fail
Definition: fsl_common.h:180
NVIC_DisableIRQ
#define NVIC_DisableIRQ
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:1830
kStatusGroup_CAAM
@ kStatusGroup_CAAM
Definition: fsl_common.h:119
kStatusGroup_SFA
@ kStatusGroup_SFA
Definition: fsl_common.h:142
kStatusGroup_PHY
@ kStatusGroup_PHY
Definition: fsl_common.h:101
kStatusGroup_TRGMUX
@ kStatusGroup_TRGMUX
Definition: fsl_common.h:102
kStatusGroup_HAL_UART
@ kStatusGroup_HAL_UART
Definition: fsl_common.h:147
kStatusGroup_LPC_I2C_1
@ kStatusGroup_LPC_I2C_1
Definition: fsl_common.h:136
fsl_clock.h
DisableGlobalIRQ
static uint32_t DisableGlobalIRQ(void)
Disable the global IRQ.
Definition: fsl_common.h:552
kStatusGroup_PDM
@ kStatusGroup_PDM
Definition: fsl_common.h:128
kStatusGroup_LPC_USART
@ kStatusGroup_LPC_USART
Definition: fsl_common.h:113
kStatusGroup_UART
@ kStatusGroup_UART
Definition: fsl_common.h:77
kStatusGroup_SPI
@ kStatusGroup_SPI
Definition: fsl_common.h:81
EnableIRQ
static status_t EnableIRQ(IRQn_Type interrupt)
Enable specific interrupt.
Definition: fsl_common.h:484
kStatusGroup_FLASH
@ kStatusGroup_FLASH
Definition: fsl_common.h:70
kStatusGroup_LPSPI
@ kStatusGroup_LPSPI
Definition: fsl_common.h:71
kStatusGroup_LPC_SPI
@ kStatusGroup_LPC_SPI
Definition: fsl_common.h:112
kStatusGroup_MSCAN
@ kStatusGroup_MSCAN
Definition: fsl_common.h:124
kStatusGroup_SDSPI
@ kStatusGroup_SDSPI
Definition: fsl_common.h:89
kStatusGroup_DMA
@ kStatusGroup_DMA
Definition: fsl_common.h:106
NVIC_EnableIRQ
#define NVIC_EnableIRQ
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:1828
kStatusGroup_SEMC
@ kStatusGroup_SEMC
Definition: fsl_common.h:139
kStatusGroup_HAL_SPI
@ kStatusGroup_HAL_SPI
Definition: fsl_common.h:149
kStatusGroup_FLEXIO_SPI
@ kStatusGroup_FLEXIO_SPI
Definition: fsl_common.h:72
kStatusGroup_FLEXSPI
@ kStatusGroup_FLEXSPI
Definition: fsl_common.h:126
kStatusGroup_SDRAMC
@ kStatusGroup_SDRAMC
Definition: fsl_common.h:98
kStatusGroup_QSPI
@ kStatusGroup_QSPI
Definition: fsl_common.h:105
kStatusGroup_Generic
@ kStatusGroup_Generic
Definition: fsl_common.h:69
kStatusGroup_HAL_GPIO
@ kStatusGroup_HAL_GPIO
Definition: fsl_common.h:146
kStatusGroup_SPDIF
@ kStatusGroup_SPDIF
Definition: fsl_common.h:131
kStatusGroup_POWER
@ kStatusGroup_POWER
Definition: fsl_common.h:99
assert.h
kStatusGroup_FLASHIAP
@ kStatusGroup_FLASHIAP
Definition: fsl_common.h:92
kStatusGroup_SAI
@ kStatusGroup_SAI
Definition: fsl_common.h:86
kStatusGroup_LPC_I2C
@ kStatusGroup_LPC_I2C
Definition: fsl_common.h:122
kStatusGroup_HAL_I2C
@ kStatusGroup_HAL_I2C
Definition: fsl_common.h:150
kStatusGroup_ECSPI
@ kStatusGroup_ECSPI
Definition: fsl_common.h:120
status_t
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:189
kStatus_Success
@ kStatus_Success
Definition: fsl_common.h:179
kStatusGroup_SDIF
@ kStatusGroup_SDIF
Definition: fsl_common.h:115
EnableGlobalIRQ
static void EnableGlobalIRQ(uint32_t primask)
Enable the global IRQ.
Definition: fsl_common.h:583
kStatusGroup_DSPI
@ kStatusGroup_DSPI
Definition: fsl_common.h:73
kStatusGroup_SDMMC
@ kStatusGroup_SDMMC
Definition: fsl_common.h:85
kStatusGroup_IAP
@ kStatusGroup_IAP
Definition: fsl_common.h:141


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:13:56