How can I re assign my timer configured using rtc_timeout_expired(to). I want to re assign the to value before expiring the timer in code warrior MC9S08QE micro

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How can I re assign my timer configured using rtc_timeout_expired(to). I want to re assign the to value before expiring the timer in code warrior MC9S08QE micro

434 次查看
arunsoman
Contributor I

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.

标记 (2)
0 项奖励
回复
0 回复数