I want to read the value of a pin 17, the value is "one" then I want to set pin number 17.
a = gpio_get(XPIN_24); /* reading value from GPIO 12 */
if (a == 1)
gpio_set(XPIN_17,a); /* a is one then turn on pin 17 */
rtc_set_timeout(to) ; /* set the timer with to = 30 seconds */
Then I am continuously checking pin number 24 (XPIN_24) , if it is "one" then I have to extend my time out time for example rtc_set_timeout() will decrease by one in system tick , before reaching zero I want to reassign to new "to" value . When I am re assigning rtc_set_timeout(to) ; I am getting wearied output .
My question is : How can I reinitialize timer before reaching zero.