example/FeatherM0/hpl/pm/hpl_pm_base.h
static inline void _pm_enable_bus_clock(const enum _pm_bus bus, const void *const module)
{
	uint32_t peripheral = ((uint32_t)module & 0x0000ff00) >> 10;

	switch (bus) {
	case PM_BUS_AHB:
		if (_pm_get_ahb_index(module) >= 0) {
			peripheral = (uint32_t)_pm_get_ahb_index(module);
			PM->AHBMASK.reg |= 1 << peripheral;
		}
		break;
	case PM_BUS_APBA:
		PM->APBAMASK.reg |= 1 << peripheral;
		break;
	case PM_BUS_APBB:
		if (_pm_get_apbb_index(module) >= 0) {
			peripheral = (uint32_t)_pm_get_apbb_index(module);
			PM->APBBMASK.reg |= 1 << peripheral;
		}
		break;
	case PM_BUS_APBC:
		PM->APBCMASK.reg |= 1 << peripheral;
		break;
	default:
		ASSERT(false);
		break;
	}
}
/**
 * \brief Enable clock on the given bus for the given hardware module
 *
 * This function enables clock on the given bus for the given hardware module.
 * For an overview of available buses and hardware modules see datasheet.
 *
 * \param[in] bus A bus to enable clock on
 * \param[in] module A hardware module to enable clock for
 */
\brief Enable clock on the given bus for the given hardware module
This function enables clock on the given bus for the given hardware module.
For an overview of available buses and hardware modules see datasheet.

\param[in] bus A bus to enable clock on
\param[in] module A hardware module to enable clock for
\ brief Enable clock on the given bus for the given hardware module This function enables clock on the given bus for the given hardware module . For an overview of available buses and hardware modules see datasheet . \ param [ in ] bus A bus to enable clock on \ param [ in ] module A hardware module to enable clock for
static inline void _pm_enable_bus_clock(const enum _pm_bus bus, const void *const module)
{
	uint32_t peripheral = ((uint32_t)module & 0x0000ff00) >> 10;
	switch (bus) {
	case PM_BUS_AHB:
		if (_pm_get_ahb_index(module) >= 0) {
			peripheral = (uint32_t)_pm_get_ahb_index(module);
			PM->AHBMASK.reg |= 1 << peripheral;
		}
		break;
	case PM_BUS_APBA:
		PM->APBAMASK.reg |= 1 << peripheral;
		break;
	case PM_BUS_APBB:
		if (_pm_get_apbb_index(module) >= 0) {
			peripheral = (uint32_t)_pm_get_apbb_index(module);
			PM->APBBMASK.reg |= 1 << peripheral;
		}
		break;
	case PM_BUS_APBC:
		PM->APBCMASK.reg |= 1 << peripheral;
		break;
	default:
		ASSERT(false);
		break;
	}
}
static inline void _pm_enable_bus_clock ( const enum _pm_bus bus , const void * const module ) { uint32_t peripheral = ( ( uint32_t ) module & 0x0000ff00 ) >> 10 ; switch ( bus ) { case PM_BUS_AHB : if ( _pm_get_ahb_index ( module ) >= 0 ) { peripheral = ( uint32_t ) _pm_get_ahb_index ( module ) ; PM -> AHBMASK . reg |= 1 << peripheral ; } break ; case PM_BUS_APBA : PM -> APBAMASK . reg |= 1 << peripheral ; break ; case PM_BUS_APBB : if ( _pm_get_apbb_index ( module ) >= 0 ) { peripheral = ( uint32_t ) _pm_get_apbb_index ( module ) ; PM -> APBBMASK . reg |= 1 << peripheral ; } break ; case PM_BUS_APBC : PM -> APBCMASK . reg |= 1 << peripheral ; break ; default : ASSERT ( false ) ; break ; } }
\brief Enable clock on the given bus for the given hardware module
 This function enables clock on the given bus for the given hardware module.
\ brief Enable clock on the given bus for the given hardware module This function enables clock on the given bus for the given hardware module .