svghmi/svghmi.c
branchsvghmi
changeset 2812 68ac5bf43525
parent 2809 b9c540253263
child 2817 45bbfb2e120f
equal deleted inserted replaced
2811:4a81cec5f786 2812:68ac5bf43525
   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 */