Exemplo n.º 1
0
/**
 *	@brief		Get module's physical address.
 *	@param[in]	ModuleIndex		An index of module ( 0 ~ x ).
 *	@return		Module's physical address
 */
U32		NX_TIMER_GetPhysicalAddress( U32 ModuleIndex )
{
	static const U32 PhysicalAddr[] = { PHY_BASEADDR_LIST( TIMER ) };

	NX_ASSERT( NUMBER_OF_TIMER_MODULE > ModuleIndex );

	return (U32)PhysicalAddr[ModuleIndex];
}
Exemplo n.º 2
0
U32 		NX_CLKGEN_GetPhysicalAddress( U32 ModuleIndex )
{
    static const U32 PhysicalAddr[] = { PHY_BASEADDR_LIST( CLKGEN ) }; // PHY_BASEADDR_CLKGEN_MODULE
    NX_CASSERT( NUMBER_OF_CLKGEN_MODULE == (sizeof(PhysicalAddr)/sizeof(PhysicalAddr[0])) );
    NX_ASSERT( NUMBER_OF_CLKGEN_MODULE > ModuleIndex );

    return (U32)PhysicalAddr[ModuleIndex];
}
Exemplo n.º 3
0
/**
 *	@brief		Get module's physical address.
 *	@return		Module's physical address. \n
 *				It is equal to PHY_BASEADDR_LVDS?_MODULE in <nx_chip.h>.
 *	@see		NX_LVDS_GetSizeOfRegisterSet,
 *				NX_LVDS_SetBaseAddress,			NX_LVDS_GetBaseAddress,
 *				NX_LVDS_OpenModule,				NX_LVDS_CloseModule,
 *				NX_LVDS_CheckBusy,
 */
U32		NX_LVDS_GetPhysicalAddress( U32 ModuleIndex )
{
    const U32 PhysicalAddr[NUMBER_OF_LVDS_MODULE] =
	{
		PHY_BASEADDR_LIST( LVDS )
	};
    NX_ASSERT( NUMBER_OF_LVDS_MODULE > ModuleIndex );
	return	PhysicalAddr[ModuleIndex];

}
Exemplo n.º 4
0
/**
 *	@brief		Get module's physical address.
 *	@return		Module's physical address
 */
U32		NX_I2S_GetPhysicalAddress( U32 ModuleIndex )
{
    static const U32 I2SPhysicalAddr[NUMBER_OF_I2S_MODULE] =
    {
        PHY_BASEADDR_LIST( I2S )
    };

    NX_ASSERT( NUMBER_OF_I2S_MODULE > ModuleIndex );

	return  (U32)I2SPhysicalAddr[ModuleIndex];
}
Exemplo n.º 5
0
U32 		NX_DISPTOP_CLKGEN_GetPhysicalAddress( U32 ModuleIndex )
{
    static const U32 PhysicalAddr[] = { PHY_BASEADDR_LIST( DISPTOP_CLKGEN ) }; // PHY_BASEADDR_DISPTOP_CLKGEN_MODULE
    NX_CASSERT( NUMBER_OF_DISPTOP_CLKGEN_MODULE == (sizeof(PhysicalAddr)/sizeof(PhysicalAddr[0])) );
    NX_ASSERT( NUMBER_OF_DISPTOP_CLKGEN_MODULE > ModuleIndex );
    //NX_ASSERT( PHY_BASEADDR_CLKGEN0_MODULE == PhysicalAddr[0] );
    //NX_ASSERT( PHY_BASEADDR_CLKGEN1_MODULE == PhysicalAddr[1] );
    //NX_ASSERT( PHY_BASEADDR_CLKGEN2_MODULE == PhysicalAddr[2] );
    // ...

    return (U32)PhysicalAddr[ModuleIndex];
}