-#define GET_PAGING_CYCLE(enmValue, T) { \
- if (enmValue == 0) T = 32; \
- else if (enmValue == 1) T = 64; \
- else if (enmValue == 2) T = 128; \
- else if (enmValue == 3) T = 256; \
- else T = 0; \
+/**
+ * @def TMR_CALCUATE_WAIT
+ *
+ * This macro calculates and assigns wait time based on the value of the
+ * timer and the timer resolution. Timer value of 0 signifies that the
+ * timer is not configured
+ *
+ * @param[out] _wait Time for which to arm the timer changed to proper
+ * value according to the resolution
+ * @param[in] _tmrVal Value of the timer
+ * @param[in] _timerRes Resolution of the timer
+ *
+*/
+#define TMR_CALCUATE_WAIT(_wait, _tmrVal, _timerRes) \
+{ \
+ (_wait) = ((_tmrVal) * SS_TICKS_SEC)/((_timerRes) * 1000); \
+ if((0 != (_tmrVal)) && (0 == (_wait))) \
+ { \
+ (_wait) = 1; \
+ } \