use array[] instead of pointer in API function parameters where required

This commit is contained in:
Gabor Kiss-Vamosi
2019-11-21 06:08:01 +01:00
parent 9e74cdb145
commit b4b6a472fb
5 changed files with 9 additions and 9 deletions

View File

@@ -114,7 +114,7 @@ enum {
# define LV_COLOR_GET_B8(c) (c).ch.blue
# define LV_COLOR_GET_A8(c) 0xFF
# define LV_COLOR_SET_R16(c, v) (c).ch.red = (uint8_t)((v) & 0x1F);
# define LV_COLOR_SET_R16(c, v) (c).ch.red = (uint8_t)(((uint8_t)(v)) & 0x1F);
# define LV_COLOR_SET_G16(c, v) (c).ch.green = (uint8_t)((v) & 0x3F);
# define LV_COLOR_SET_G16_SWAP(c, v) {(c).ch.green_h = (uint8_t)(((v) >> 3) & 0x7); (c).ch.green_l = (uint8_t)((v) & 0x7);}
# define LV_COLOR_SET_B16(c, v) (c).ch.blue = (uint8_t)((v) & 0x1F);

View File

@@ -234,7 +234,7 @@ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showe
* WILL BE SAVED! CAN'T BE LOCAL ARRAY.
* @param date_num number of dates in the array
*/
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num)
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t highlighted[], uint16_t date_num)
{
LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
LV_ASSERT_NULL(highlighted);

View File

@@ -122,7 +122,7 @@ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showe
* WILL BE SAVED! CAN'T BE LOCAL ARRAY.
* @param date_num number of dates in the array
*/
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num);
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t highlighted[], uint16_t date_num);
/**
* Set the name of the days

View File

@@ -167,11 +167,11 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element)
/**
* Set the valid position's indices. The scrolling will be possible only to these positions.
* @param tileview pointer to a Tileview object
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`. Only the
* pointer is saved so can't be a local variable.
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`.
* Only the pointer is saved so can't be a local variable.
* @param valid_pos_cnt numner of elements in `valid_pos` array
*/
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * valid_pos, uint16_t valid_pos_cnt)
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t valid_pos[], uint16_t valid_pos_cnt)
{
LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
LV_ASSERT_NULL(valid_pos);

View File

@@ -86,11 +86,11 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element);
/**
* Set the valid position's indices. The scrolling will be possible only to these positions.
* @param tileview pointer to a Tileview object
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`. Only the
* pointer is saved so can't be a local variable.
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`.
* Only the pointer is saved so can't be a local variable.
* @param valid_pos_cnt numner of elements in `valid_pos` array
*/
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * valid_pos, uint16_t valid_pos_cnt);
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t valid_pos[], uint16_t valid_pos_cnt);
/**
* Set the tile to be shown