Replace uintptr_t with lv_uintptr_t
uintptr_t is not supported by the 16 bit PIC's compiler (e.g. dsPIC33)
This commit is contained in:
@@ -6,9 +6,9 @@
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
|
|
||||||
#include "lv_font.h"
|
#include "lv_font.h"
|
||||||
#include "lv_font_fmt_txt.h"
|
#include "lv_font_fmt_txt.h"
|
||||||
|
#include "../lv_misc/lv_types.h"
|
||||||
#include "../lv_misc/lv_log.h"
|
#include "../lv_misc/lv_log.h"
|
||||||
#include "../lv_misc/lv_utils.h"
|
#include "../lv_misc/lv_utils.h"
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
|
|||||||
uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
|
uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
|
||||||
|
|
||||||
if(p) {
|
if(p) {
|
||||||
uint32_t ofs = (uintptr_t)p - (uintptr_t) fdsc->cmaps[i].unicode_list;
|
uint32_t ofs = (lv_uintptr_t)p - (lv_uintptr_t) fdsc->cmaps[i].unicode_list;
|
||||||
ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
|
ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
|
||||||
glyph_id = fdsc->cmaps[i].glyph_id_start + ofs;
|
glyph_id = fdsc->cmaps[i].glyph_id_start + ofs;
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
|
|||||||
uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
|
uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
|
||||||
|
|
||||||
if(p) {
|
if(p) {
|
||||||
uint32_t ofs = (uintptr_t)p - (uintptr_t) fdsc->cmaps[i].unicode_list;
|
uint32_t ofs = (lv_uintptr_t)p - (lv_uintptr_t) fdsc->cmaps[i].unicode_list;
|
||||||
ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
|
ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
|
||||||
const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list;
|
const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list;
|
||||||
glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[ofs];
|
glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[ofs];
|
||||||
@@ -180,7 +180,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
|
|||||||
|
|
||||||
/*If the `g_id_both` were found get its index from the pointer*/
|
/*If the `g_id_both` were found get its index from the pointer*/
|
||||||
if(kid_p) {
|
if(kid_p) {
|
||||||
uintptr_t ofs = (uintptr_t)kid_p - (uintptr_t)g_ids;
|
uint32_t ofs = (lv_uintptr_t)kid_p - (lv_uintptr_t)g_ids;
|
||||||
ofs = ofs >> 1; /*ofs is for pair, divide by 2 to refer as a single value*/
|
ofs = ofs >> 1; /*ofs is for pair, divide by 2 to refer as a single value*/
|
||||||
value = kdsc->values[ofs];
|
value = kdsc->values[ofs];
|
||||||
}
|
}
|
||||||
@@ -193,7 +193,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
|
|||||||
|
|
||||||
/*If the `g_id_both` were found get its index from the pointer*/
|
/*If the `g_id_both` were found get its index from the pointer*/
|
||||||
if(kid_p) {
|
if(kid_p) {
|
||||||
uintptr_t ofs = (uintptr_t)kid_p - (uintptr_t)g_ids;
|
uint32_t ofs = (lv_uintptr_t)kid_p - (lv_uintptr_t)g_ids;
|
||||||
ofs = ofs >> 4; /*ofs is 4 byte pairs, divide by 4 to refer as a single value*/
|
ofs = ofs >> 4; /*ofs is 4 byte pairs, divide by 4 to refer as a single value*/
|
||||||
value = kdsc->values[ofs];
|
value = kdsc->values[ofs];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ enum {
|
|||||||
};
|
};
|
||||||
typedef uint8_t lv_res_t;
|
typedef uint8_t lv_res_t;
|
||||||
|
|
||||||
|
typedef unsigned long int lv_uintptr_t;
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
|
|||||||
Reference in New Issue
Block a user