/* Exit a critical section. Critical sections are needed in an interrupt driven software program to obtain mutual exclusive access shared resources such as global data and certain peripherals. Note that each call to this function should always be preceded by a call to  */
void TbxCriticalSectionExit(void)
/* Exit a critical section. Critical sections are needed in an interrupt driven software program to obtain mutual exclusive access shared resources such as global data and certain peripherals. Note that each call to this function should always be preceded by a call to  */
void TbxCriticalSectionExit(void)
{
  TBX_ASSERT(tbxCritSectNestingCounter > 0U);
  if (tbxCritSectNestingCounter > 0U)
  {
    tbxCritSectNestingCounter--;
    if (tbxCritSectNestingCounter == 0U)
    {
      TbxPortInterruptsRestore(tbxCritSectCpuSR);
    }
  }
}