Update us_ticker_api.c

Common: us_ticker_API - check PRIMASK before re-enabling interrupts

Implemented logic to save the PRIMASK value returned by __disable_irq(), and check it before calling __enable_irq(). This will prevent interrupts from being prematurely re-enabled if they have been intentionally disabled by the user program.