equal
deleted
inserted
replaced
168 } |
168 } |
169 // else ... : PLC can't wait, variable will be updated next turn |
169 // else ... : PLC can't wait, variable will be updated next turn |
170 return 0; |
170 return 0; |
171 } |
171 } |
172 |
172 |
173 inline void update_refresh_period(hmi_tree_item_t *dsc, uint16_t refresh_period_ms) |
173 void update_refresh_period(hmi_tree_item_t *dsc, uint16_t refresh_period_ms) |
174 { |
174 { |
175 while(AtomicCompareExchange(&dsc->wlock, 0, 1)) sched_yield(); |
175 while(AtomicCompareExchange(&dsc->wlock, 0, 1)) sched_yield(); |
176 dsc->refresh_period_ms = refresh_period_ms; |
176 dsc->refresh_period_ms = refresh_period_ms; |
177 if(refresh_period_ms) { |
177 if(refresh_period_ms) { |
178 /* TODO : maybe only if was null before for optimization */ |
178 /* TODO : maybe only if was null before for optimization */ |