1 /** 2 * @file lv_chart_private.h 3 * 4 */ 5 6 #ifndef LV_CHART_PRIVATE_H 7 #define LV_CHART_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "../../core/lv_obj_private.h" 18 #include "lv_chart.h" 19 20 #if LV_USE_CHART != 0 21 22 /********************* 23 * DEFINES 24 *********************/ 25 26 /********************** 27 * TYPEDEFS 28 **********************/ 29 30 /** 31 * Descriptor a chart series 32 */ 33 struct _lv_chart_series_t { 34 int32_t * x_points; 35 int32_t * y_points; 36 lv_color_t color; 37 uint32_t start_point; 38 uint32_t hidden : 1; 39 uint32_t x_ext_buf_assigned : 1; 40 uint32_t y_ext_buf_assigned : 1; 41 uint32_t x_axis_sec : 1; 42 uint32_t y_axis_sec : 1; 43 }; 44 45 struct _lv_chart_cursor_t { 46 lv_point_t pos; 47 int32_t point_id; 48 lv_color_t color; 49 lv_chart_series_t * ser; 50 lv_dir_t dir; 51 uint32_t pos_set: 1; /**< 1: pos is set; 0: point_id is set */ 52 }; 53 54 struct _lv_chart_t { 55 lv_obj_t obj; 56 lv_ll_t series_ll; /**< Linked list for series (stores lv_chart_series_t) */ 57 lv_ll_t cursor_ll; /**< Linked list for cursors (stores lv_chart_cursor_t) */ 58 int32_t ymin[2]; 59 int32_t ymax[2]; 60 int32_t xmin[2]; 61 int32_t xmax[2]; 62 int32_t pressed_point_id; 63 uint32_t hdiv_cnt; /**< Number of horizontal division lines */ 64 uint32_t vdiv_cnt; /**< Number of vertical division lines */ 65 uint32_t point_cnt; /**< Number of points in all series */ 66 lv_chart_type_t type : 3; /**< Chart type */ 67 lv_chart_update_mode_t update_mode : 2; 68 }; 69 70 71 /********************** 72 * GLOBAL PROTOTYPES 73 **********************/ 74 75 /********************** 76 * MACROS 77 **********************/ 78 79 #endif /* LV_USE_CHART != 0 */ 80 81 #ifdef __cplusplus 82 } /*extern "C"*/ 83 #endif 84 85 #endif /*LV_CHART_PRIVATE_H*/ 86