Lines Matching refs:cnt
43 static void new_points_alloc(lv_obj_t * obj, lv_chart_series_t * ser, uint32_t cnt, lv_coord_t ** a…
104 void lv_chart_set_point_count(lv_obj_t * obj, uint16_t cnt) in lv_chart_set_point_count() argument
109 if(chart->point_cnt == cnt) return; in lv_chart_set_point_count()
113 if(cnt < 1) cnt = 1; in lv_chart_set_point_count()
117 if(!ser->x_ext_buf_assigned) new_points_alloc(obj, ser, cnt, &ser->x_points); in lv_chart_set_point_count()
119 if(!ser->y_ext_buf_assigned) new_points_alloc(obj, ser, cnt, &ser->y_points); in lv_chart_set_point_count()
123 chart->point_cnt = cnt; in lv_chart_set_point_count()
1743 static void new_points_alloc(lv_obj_t * obj, lv_chart_series_t * ser, uint32_t cnt, lv_coord_t ** a) in new_points_alloc() argument
1752 lv_coord_t * new_points = lv_mem_alloc(sizeof(lv_coord_t) * cnt); in new_points_alloc()
1756 if(cnt >= point_cnt_old) { in new_points_alloc()
1761 for(i = point_cnt_old; i < cnt; i++) { in new_points_alloc()
1766 for(i = 0; i < cnt; i++) { in new_points_alloc()
1777 (*a) = lv_mem_realloc((*a), sizeof(lv_coord_t) * cnt); in new_points_alloc()
1781 if(cnt > point_cnt_old) { in new_points_alloc()
1782 for(i = point_cnt_old - 1; i < cnt; i++) { in new_points_alloc()