FreeRTOS/Demo/Safer_Interrupts_M33F_NXP_LPC55S69_MCUXpresso/NXP_Code/drivers/fsl_pint.c
/*!
 * brief	Get PINT pattern match configuration.

 * This function returns the configuration of a given pattern match bit slice.
 *
 * param base Base address of the PINT peripheral.
 * param bslice Pattern match bit slice number.
 * param cfg Pointer to bit slice configuration.
 *
 * retval None.
 */
brief        Get PINT pattern match configuration.
This function returns the configuration of a given pattern match bit slice.

param base Base address of the PINT peripheral.
param bslice Pattern match bit slice number.
param cfg Pointer to bit slice configuration.

retval None.
brief Get PINT pattern match configuration . This function returns the configuration of a given pattern match bit slice . param base Base address of the PINT peripheral . param bslice Pattern match bit slice number . param cfg Pointer to bit slice configuration . retval None .
void PINT_PatternMatchGetConfig(PINT_Type *base, pint_pmatch_bslice_t bslice, pint_pmatch_cfg_t *cfg)
{
    uint32_t src_shift;
    uint32_t cfg_shift;
    uint32_t tmp_src_shift = PININT_BITSLICE_SRC_MASK;
    uint32_t tmp_cfg_shift = PININT_BITSLICE_CFG_MASK;
    assert(base != NULL);
    src_shift = PININT_BITSLICE_SRC_START + ((uint32_t)bslice * 3UL);
    cfg_shift = PININT_BITSLICE_CFG_START + ((uint32_t)bslice * 3UL);
    cfg->bs_src = (pint_pmatch_input_src_t)(uint32_t)((base->PMSRC & (tmp_src_shift << src_shift)) >> src_shift);
    cfg->bs_cfg = (pint_pmatch_bslice_cfg_t)(uint32_t)((base->PMCFG & (tmp_cfg_shift << cfg_shift)) >> cfg_shift);
    if ((uint32_t)bslice == 7U)
    {
        cfg->end_point = true;
    }
    else
    {
        cfg->end_point = (((base->PMCFG & (1UL << (uint32_t)bslice)) >> (uint32_t)bslice) != 0U) ? true : false;
    }
    if (base == PINT)
    {
        if ((uint32_t)bslice < (uint32_t)FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS)
        {
            cfg->callback = s_pintCallback[bslice];
        }
    }
    else
    {
#if (defined(FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS) && FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS)
        if ((uint32_t)bslice < (uint32_t)FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS)
        {
            cfg->callback = s_secpintCallback[bslice];
        }
#endif
    }
}
void PINT_PatternMatchGetConfig ( PINT_Type * base , pint_pmatch_bslice_t bslice , pint_pmatch_cfg_t * cfg ) { uint32_t src_shift ; uint32_t cfg_shift ; uint32_t tmp_src_shift = PININT_BITSLICE_SRC_MASK ; uint32_t tmp_cfg_shift = PININT_BITSLICE_CFG_MASK ; assert ( base != NULL ) ; src_shift = PININT_BITSLICE_SRC_START + ( ( uint32_t ) bslice * 3UL ) ; cfg_shift = PININT_BITSLICE_CFG_START + ( ( uint32_t ) bslice * 3UL ) ; cfg -> bs_src = ( pint_pmatch_input_src_t ) ( uint32_t ) ( ( base -> PMSRC & ( tmp_src_shift << src_shift ) ) >> src_shift ) ; cfg -> bs_cfg = ( pint_pmatch_bslice_cfg_t ) ( uint32_t ) ( ( base -> PMCFG & ( tmp_cfg_shift << cfg_shift ) ) >> cfg_shift ) ; if ( ( uint32_t ) bslice == 7U ) { cfg -> end_point = true ; } else { cfg -> end_point = ( ( ( base -> PMCFG & ( 1UL << ( uint32_t ) bslice ) ) >> ( uint32_t ) bslice ) != 0U ) ? true : false ; } if ( base == PINT ) { if ( ( uint32_t ) bslice < ( uint32_t ) FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS ) { cfg -> callback = s_pintCallback [ bslice ] ; } } else { #if ( defined ( FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS ) && FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS ) if ( ( uint32_t ) bslice < ( uint32_t ) FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS ) { cfg -> callback = s_secpintCallback [ bslice ] ; } #endif } }
brief        Get PINT pattern match configuration.
brief Get PINT pattern match configuration .