/* Lock a given peripheral's control registers until hardware reset. 
Locks a given peripheral's control registers, to deny write access to the peripheral to prevent accidental changes to the module's configuration. After lock, the only way to unlock is hardware reset. */
__no_inline enum status_code system_peripheral_lock_always(const uint32_t peripheral_id, const uint32_t key)
/* Lock a given peripheral's control registers until hardware reset. 
Locks a given peripheral's control registers, to deny write access to the peripheral to prevent accidental changes to the module's configuration. After lock, the only way to unlock is hardware reset. */
__no_inline enum status_code system_peripheral_lock_always(const uint32_t peripheral_id, const uint32_t key)
{
	if (~peripheral_id != key) {
		Assert(false);
		return STATUS_ERR_INVALID_ARG;
	}
	PAC->WRCTRL.reg = peripheral_id | PAC_WRCTRL_KEY(PAC_WRCTRL_KEY_SETLCK_Val);
	return STATUS_OK;
}