雷竞技电竞平台Dialog半导体客户支持到期
https://support.dialog-semiconductor.com/resource-keywords/expire
在
-
App_easy_timer_cancel检查是否过期
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/appeasytimercancel-checking-if-expired
< div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >你好,< / p > < p >我在app_on_connection启动一个计时器。这个计时器在给定的时间后终止连接。如果用户在计时器结束前断开连接,则应取消计时器。这在用户在计时器结束之前断开连接的情况下是有效的,但它在计时器处理程序终止连接时给我一个错误。
据我所知,这是因为当计时器过期时,传递给app_easy_timer_cancel的timer_id无效。然而,我认为添加一个检查像if(conn_timeout != EASY_TIMER_INVALID_TIMER){..就能解决这个问题。< / p > < p > 1)。有人能告诉我为什么app_easy_timer_cancel仍然执行,即使我之前检查有效性?这是在app_on_disconnect上执行的代码片段。< / p > < p > printf_string(“用户断开连接! \ n \ r”);< br / >如果(conn_timeout ! = EASY_TIMER_INVALID_TIMER) {< br / > / / < br / >取消计时器printf_string(“conn_timeout取消了由于用户断开\ n \ r”);< br / > app_easy_timer_cancel (conn_timeout); < br / >} < / p > < p > 2)。 I used the watch tool from Keil to keep an eye on the value of conn_timeout. It is 0x00 initially and stays this value if I connect and disconnect before the timer elapses. However when the timer does elapse and the callback of conn_timeout is executed, conn_timeout keeps the value 0x03. It stays at this value even if I proceed the software (after it gets stuck on ASSERT_WARNING(0) in void app_easy_timer_cancel(const timer_hnd timer_id)). Also connecting and disconnecting is still possible. Doing this ( quicker than the timer period) also does not make a change to the value 0x03.
What does this value mean? Isn't this value supposed to be reset to 0x00 when the timer elapses or when the timer is cancelled? Kind regards,
Niek
星期三,2017年7月19日19:38:13 +0000
Niekvdd
69370年https://support.dialog-semiconductor.com
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/appeasytimercancel-checking-if-expired#comments