Revert some const changes (for now)

This commit is contained in:
Scott Lahteine
2018-11-20 08:19:35 -06:00
parent 4def8b3b5e
commit 0946cbcdca
5 changed files with 25 additions and 25 deletions

View File

@ -866,11 +866,11 @@ static const hd44780_charmap_t g_hd44780_charmap_common[] PROGMEM = {
};
/* return v1 - v2 */
static int hd44780_charmap_compare(const hd44780_charmap_t * const v1, const hd44780_charmap_t * const v2) {
static int hd44780_charmap_compare(hd44780_charmap_t * v1, hd44780_charmap_t * v2) {
return (v1->uchar < v2->uchar) ? -1 : (v1->uchar > v2->uchar) ? 1 : 0;
}
static int pf_bsearch_cb_comp_hd4map_pgm(void *userdata, const size_t idx, const void * const data_pin) {
static int pf_bsearch_cb_comp_hd4map_pgm(void *userdata, size_t idx, void * data_pin) {
hd44780_charmap_t localval;
hd44780_charmap_t *p_hd44780_charmap = (hd44780_charmap_t *)userdata;
memcpy_P(&localval, p_hd44780_charmap + idx, sizeof(localval));
@ -883,7 +883,7 @@ void lcd_put_int(const int i) { lcd.print(i); }
// return < 0 on error
// return the advanced cols
int lcd_put_wchar_max(const wchar_t c, pixel_len_t max_length) {
int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) {
// find the HD44780 internal ROM first
int ret;
@ -938,7 +938,7 @@ int lcd_put_wchar_max(const wchar_t c, pixel_len_t max_length) {
*
* Draw a UTF-8 string
*/
static int lcd_put_u8str_max_cb(const char * const utf8_str, uint8_t (*cb_read_byte)(uint8_t * str), pixel_len_t max_length) {
static int lcd_put_u8str_max_cb(const char * utf8_str, uint8_t (*cb_read_byte)(uint8_t * str), pixel_len_t max_length) {
pixel_len_t ret = 0;
uint8_t *p = (uint8_t *)utf8_str;
while (ret < max_length) {
@ -950,17 +950,17 @@ static int lcd_put_u8str_max_cb(const char * const utf8_str, uint8_t (*cb_read_b
return (int)ret;
}
int lcd_put_u8str_max(const char * const utf8_str, pixel_len_t max_length) {
int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) {
return lcd_put_u8str_max_cb(utf8_str, read_byte_ram, max_length);
}
int lcd_put_u8str_max_P(PGM_P const utf8_str_P, pixel_len_t max_length) {
int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length);
}
#if ENABLED(DEBUG_LCDPRINT)
int test_hd44780_charmap(hd44780_charmap_t *data, const size_t size, const char * const name, const bool flg_show_contents) {
int test_hd44780_charmap(hd44780_charmap_t *data, size_t size, char *name, char flg_show_contents) {
int ret;
size_t idx = 0;
hd44780_charmap_t preval = {0, 0, 0};