Exemplo n.º 1
0
/**
 *	@brief		Get module's reset index.
 *	@return		Module's reset index.\n
 *				It is equal to RESETINDEX_OF_LVDS?_MODULE_i_nRST in <nx_chip.h>.
 *	@see		NX_RSTCON_Enter,
 *				NX_RSTCON_Leave,
 *				NX_RSTCON_GetStatus
 */
U32 NX_LVDS_GetResetNumber ( U32 ModuleIndex )
{
	const U32 ResetNumber[] =
	{
		RESETINDEX_LIST( LVDS, I_RESETN )
	};
	NX_CASSERT( NUMBER_OF_LVDS_MODULE == (sizeof(ResetNumber)/sizeof(ResetNumber[0])) );
    NX_ASSERT( NUMBER_OF_LVDS_MODULE > ModuleIndex );
	return	ResetNumber[ModuleIndex];
}
Exemplo n.º 2
0
/**
 *	@brief		Get module's reset index.
 *	@return		Module's reset index.\n
 *				It is equal to RESETINDEX_OF_USB20OTG?_MODULE_i_nRST in <nx_chip.h>.
 *	@see		NX_RSTCON_Enter,
 *				NX_RSTCON_Leave,
 *				NX_RSTCON_GetStatus
 */
U32  NX_USB20OTG_GetResetNumber (  )
{
    const U32  ResetNumber[] =
    {
        RESETINDEX_LIST( USB20OTG, i_nRST )
    };
    NX_CASSERT( NUMBER_OF_USB20OTG_MODULE == (sizeof(ResetNumber)/sizeof(ResetNumber[0])) );
    NX_ASSERT( NUMBER_OF_USB20OTG_MODULE > 0 );
    return	ResetNumber[0];
}
Exemplo n.º 3
0
/**
 *	@brief		Get module's reset index.
 *	@return		Module's reset index.\n
 *				It is equal to RESETINDEX_OF_CRYPTO?_MODULE_i_nRST in <nx_chip.h>.
 *	@see		NX_RSTCON_Enter,
 *				NX_RSTCON_Leave,
 *				NX_RSTCON_GetStatus
 */
U32 NX_CRYPTO_GetResetNumber ( U32 ModuleIndex )
{
	const U32 ResetNumber[] =
	{
		RESETINDEX_LIST( CRYPTO, i_nRST )
	};
	NX_CASSERT( NUMBER_OF_CRYPTO_MODULE == (sizeof(ResetNumber)/sizeof(ResetNumber[0])) );  
    NX_ASSERT( NUMBER_OF_CRYPTO_MODULE > ModuleIndex );
	return	ResetNumber[ModuleIndex];
}
Exemplo n.º 4
0
/**
 *	@brief		Get module's reset index.
 *	@return		Module's reset index.
 *				It is equal to RESETINDEX_OF_TIMER?_MODULE_i_nRST in <nx_chip.h>.
 */
U32 NX_TIMER_GetResetNumber ( U32 ModuleIndex )
{
	const U32 ResetNumber[] =
	{
		RESETINDEX_LIST( TIMER, PRESETn )
	};
	NX_CASSERT( NUMBER_OF_TIMER_MODULE == (sizeof(ResetNumber)/sizeof(ResetNumber[0])) );
    NX_ASSERT( NUMBER_OF_TIMER_MODULE > ModuleIndex );

	return	ResetNumber[ModuleIndex];
}
Exemplo n.º 5
0
/**
 *  @brief      	Get current reset number
 *  @param[in]	ModuleIndex		A index of module.
 *  @return		Current reset number
 *  @remarks
 */
U32     NX_I2S_GetResetNumber( U32 ModuleIndex )
{
    const U32 ResetPortNumber[NUMBER_OF_I2S_MODULE] =
    {
        RESETINDEX_LIST( I2S, PRESETn )
    };

    NX_ASSERT( NUMBER_OF_I2S_MODULE > ModuleIndex );

    return (U32)ResetPortNumber[ModuleIndex];
}