/* PCNT register synchronization freeze control. 
Some PCNT registers require synchronization into the low frequency (LF) domain. The freeze feature allows for several such registers to be modified before passing them to the LF domain simultaneously (which takes place when the freeze mode is disabled). */
void PCNT_FreezeEnable(PCNT_TypeDef *pcnt, bool enable)
/* PCNT register synchronization freeze control. 
Some PCNT registers require synchronization into the low frequency (LF) domain. The freeze feature allows for several such registers to be modified before passing them to the LF domain simultaneously (which takes place when the freeze mode is disabled). */
void PCNT_FreezeEnable(PCNT_TypeDef *pcnt, bool enable)
{
  EFM_ASSERT(PCNT_REF_VALID(pcnt));
  if (enable)
  {
    while (pcnt->SYNCBUSY)
      ;
    pcnt->FREEZE = PCNT_FREEZE_REGFREEZE;
  }
  else
  {
    pcnt->FREEZE = 0;
  }
}