Ksdk_common

## Typedefs

typedef int32_t | status_t
| Type used for all status and error return values.

## Enumerations

enum

_status_groups {
kStatusGroup_Generic = 0,
kStatusGroup_FLASH = 1,
kStatusGroup_LPSPI = 4,
kStatusGroup_FLEXIO_SPI = 5,
kStatusGroup_DSPI = 6,
kStatusGroup_FLEXIO_UART = 7,
kStatusGroup_FLEXIO_I2C = 8,
kStatusGroup_LPI2C = 9,
kStatusGroup_UART = 10,
kStatusGroup_I2C = 11,
kStatusGroup_LPSCI = 12,
kStatusGroup_LPUART = 13,
kStatusGroup_SPI = 14,
kStatusGroup_XRDC = 15,
kStatusGroup_SEMA42 = 16,
kStatusGroup_SDHC = 17,
kStatusGroup_SDMMC = 18,
kStatusGroup_SAI = 19,
kStatusGroup_MCG = 20,
kStatusGroup_SCG = 21,
kStatusGroup_SDSPI = 22,
kStatusGroup_FLEXIO_I2S = 23,
kStatusGroup_SDRAMC = 35,
kStatusGroup_POWER = 39,
kStatusGroup_ENET = 40,
kStatusGroup_PHY = 41,
kStatusGroup_TRGMUX = 42,
kStatusGroup_SMARTCARD = 43,
kStatusGroup_LMEM = 44,
kStatusGroup_QSPI = 45,
kStatusGroup_DMA = 50,
kStatusGroup_EDMA = 51,
kStatusGroup_DMAMGR = 52,
kStatusGroup_FLEXCAN = 53,
kStatusGroup_LTC = 54,
kStatusGroup_FLEXIO_CAMERA = 55,
kStatusGroup_NOTIFIER = 98,
kStatusGroup_DebugConsole = 99,
kStatusGroup_ApplicationRangeStart = 100
}

| Status group numbers. More...

enum

_generic_status {
kStatus_Success = MAKE_STATUS(kStatusGroup_Generic, 0),
kStatus_Fail = MAKE_STATUS(kStatusGroup_Generic, 1),
kStatus_ReadOnly = MAKE_STATUS(kStatusGroup_Generic, 2),
kStatus_OutOfRange = MAKE_STATUS(kStatusGroup_Generic, 3),
kStatus_InvalidArgument = MAKE_STATUS(kStatusGroup_Generic, 4),
kStatus_Timeout = MAKE_STATUS(kStatusGroup_Generic, 5),
kStatus_NoTransferInProgress = MAKE_STATUS(kStatusGroup_Generic, 6),
kStatus_Success = MAKE_STATUS(kStatusGroupGeneric, 0),
kStatus_Fail = MAKE_STATUS(kStatusGroupGeneric, 1),
kStatus_ReadOnly = MAKE_STATUS(kStatusGroupGeneric, 2),
kStatus_OutOfRange = MAKE_STATUS(kStatusGroupGeneric, 3),
kStatus_InvalidArgument = MAKE_STATUS(kStatusGroupGeneric, 4)
}

| Generic status return codes.

## Functions

static void | EnableIRQ (IRQn_Type interrupt)
| Enable specific interrupt. More...
static void | DisableIRQ (IRQn_Type interrupt)
| Disable specific interrupt. More...
static uint32_t | DisableGlobalIRQ (void)
| Disable the global IRQ. More...
static void | EnableGlobalIRQ (uint32_t primask)
| Enaable the global IRQ. More...
void | InstallIRQHandler (IRQn_Type irq, uint32_t irqHandler)
| install IRQ handler More...

## Usage Information

## Enumeration Type Documentation

enum _status_groups

Status group numbers.

Enumerator
kStatusGroup_Generic | Group number for generic status codes.
kStatusGroup_FLASH | Group number for FLASH status codes.
kStatusGroup_LPSPI | Group number for LPSPI status codes.
kStatusGroup_FLEXIO_SPI | Group number for FLEXIO SPI status codes.
kStatusGroup_DSPI | Group number for DSPI status codes.
kStatusGroup_FLEXIO_UART | Group number for FLEXIO UART status codes.
kStatusGroup_FLEXIO_I2C | Group number for FLEXIO I2C status codes.
kStatusGroup_LPI2C | Group number for LPI2C status codes.
kStatusGroup_UART | Group number for UART status codes.
kStatusGroup_I2C | Group number for UART status codes.
kStatusGroup_LPSCI | Group number for LPSCI status codes.
kStatusGroup_LPUART | Group number for LPUART status codes.
kStatusGroup_SPI | Group number for SPI status code.
kStatusGroup_XRDC | Group number for XRDC status code.
kStatusGroup_SEMA42 | Group number for SEMA42 status code.
kStatusGroup_SDHC | Group number for SDHC status code
kStatusGroup_SDMMC | Group number for SDMMC status code
kStatusGroup_SAI | Group number for SAI status code
kStatusGroup_MCG | Group number for MCG status codes.
kStatusGroup_SCG | Group number for SCG status codes.
kStatusGroup_SDSPI | Group number for SDSPI status codes.
kStatusGroup_FLEXIO_I2S | Group number for FLEXIO I2S status codes
kStatusGroup_SDRAMC | Group number for SDRAMC status codes.
kStatusGroup_POWER | Group number for POWER status codes.
kStatusGroup_ENET | Group number for ENET status codes.
kStatusGroup_PHY | Group number for PHY status codes.
kStatusGroup_TRGMUX | Group number for TRGMUX status codes.
kStatusGroup_SMARTCARD | Group number for SMARTCARD status codes.
kStatusGroup_LMEM | Group number for LMEM status codes.
kStatusGroup_QSPI | Group number for QSPI status codes.
kStatusGroup_DMA | Group number for DMA status codes.
kStatusGroup_EDMA | Group number for EDMA status codes.
kStatusGroup_DMAMGR | Group number for DMAMGR status codes.
kStatusGroup_FLEXCAN | Group number for FlexCAN status codes.
kStatusGroup_LTC | Group number for LTC status codes.
kStatusGroup_FLEXIO_CAMERA | Group number for FLEXIO CAMERA status codes.
kStatusGroup_NOTIFIER | Group number for NOTIFIER status codes.
kStatusGroup_DebugConsole | Group number for debug console status codes.
kStatusGroup_ApplicationRangeStart | Starting number for application groups.

## Function Documentation

static uint32_t DisableGlobalIRQ | ( | void |  | ) |

inlinestatic

Disable the global IRQ.

Disable the global interrupt and return the current primask register. User is required to provided the primask register for the EnableGlobalIRQ().

Returns
  Current primask value.

static void DisableIRQ | ( | IRQn_Type | interrupt | ) |

inlinestatic

Disable specific interrupt.

Disable the interrupt not routed from intmux.

Parameters

  interrupt | The IRQ number.

static void EnableGlobalIRQ | ( | uint32_t | primask | ) |

inlinestatic

Enaable the global IRQ.

Set the primask register with the provided primask value but not just enable the primask. The idea is for the convinience of integration of RTOS. some RTOS get its own management mechanism of primask. User is required to use the EnableGlobalIRQ() and DisableGlobalIRQ() in pair.

Parameters

  primask | value of primask register to be restored. The primask value is supposed to be provided by the DisableGlobalIRQ().

static void EnableIRQ | ( | IRQn_Type | interrupt | ) |

inlinestatic

Enable specific interrupt.

Enable the interrupt not routed from intmux.

Parameters

  interrupt | The IRQ number.

void InstallIRQHandler | ( | IRQn_Type | irq,
|  | uint32_t | irqHandler
| ) |  |

install IRQ handler

Parameters

  irq | IRQ number
  irqHandler | IRQ handler address