Skip to content

Commit

Permalink
2.31.1
Browse files Browse the repository at this point in the history
  • Loading branch information
olikraus committed Sep 19, 2021
1 parent 55639a3 commit 6256e85
Show file tree
Hide file tree
Showing 12 changed files with 3,764 additions and 448 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Description: https://github.com/olikraus/u8g2/wiki

Issue Tracker: https://github.com/olikraus/u8g2/issues

Download (2.30.1): https://github.com/olikraus/U8g2_Arduino/archive/master.zip
Download (2.31.1): https://github.com/olikraus/U8g2_Arduino/archive/master.zip

8 changes: 4 additions & 4 deletions examples/page_buffer/IconMenu/IconMenu.ino
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
//U8G2_LD7032_60X32_ALT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board
//U8G2_LD7032_60X32_ALT_F_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED!
//U8G2_UC1701_EA_DOGS102_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_UC1701_EA_DOGS102_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
U8G2_UC1701_EA_DOGS102_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_PCD8544_84X48_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display
//U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display
//U8G2_PCF8812_96X65_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814
Expand Down Expand Up @@ -309,13 +309,13 @@
void setup(void) {

// DOGS102 Shield (http://shieldlist.org/controlconnection/dogs102)
// u8g2.begin(/* menu_select_pin= */ 5, /* menu_next_pin= */ 4, /* menu_prev_pin= */ 2, /* menu_home_pin= */ 3);
u8g2.begin(/* menu_select_pin= */ 5, /* menu_next_pin= */ 4, /* menu_prev_pin= */ 2, /* menu_home_pin= */ 3);

// DOGM128 Shield (http://shieldlist.org/schmelle2/dogm128) + DOGXL160 Shield
u8g2.begin(/* menu_select_pin= */ 2, /* menu_next_pin= */ 3, /* menu_prev_pin= */ 7, /* menu_home_pin= */ 8);
// u8g2.begin(/* menu_select_pin= */ 2, /* menu_next_pin= */ 3, /* menu_prev_pin= */ 7, /* menu_home_pin= */ 8);

// MKR Zero Test Board
u8g2.begin(/*Select=*/ 0, /*Right/Next=*/ 1, /*Left/Prev=*/ 2, /*Up=*/ 4, /*Down=*/ 3, /*Home/Cancel=*/ A6);
// u8g2.begin(/*Select=*/ 0, /*Right/Next=*/ 1, /*Left/Prev=*/ 2, /*Up=*/ 4, /*Down=*/ 3, /*Home/Cancel=*/ A6);

// Arduboy
//u8g2.begin(/*Select=*/ A0, /*Right/Next=*/ 5, /*Left/Prev=*/ 9, /*Up=*/ 8, /*Down=*/ 10, /*Home/Cancel=*/ A1); // Arduboy DevKit
Expand Down
2 changes: 1 addition & 1 deletion examples/u8x8/HelloWorld/HelloWorld.ino
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
//U8X8_HD44102_100X64 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low!
//U8X8_T7932_150X32 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low!
//U8X8_UC1701_EA_DOGS102_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8X8_UC1701_EA_DOGS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
U8X8_UC1701_EA_DOGS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8X8_PCD8544_84X48_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display
//U8X8_PCD8544_84X48_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display
//U8X8_PCF8812_96X65_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814
Expand Down
2 changes: 2 additions & 0 deletions extras/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,5 @@ https://github.com/olikraus/u8g2 ChangeLog
* Font Wiki page splitted into four sub-pages to avoid the GitHub 'abuse' message.
2021-09-07 v2.30.1 olikraus@gmail.com
* Bugfix drawButtonUTF8 (added C++ code, issue 1577)
2021-09-19 v2.31.1 olikraus@gmail.com
* Added icons from https://app.streamlinehq.com/icons/pixel (issue 1589)
60 changes: 60 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,66 @@ u8x8_font_open_iconic_embedded_8x8 LITERAL1
u8x8_font_open_iconic_play_8x8 LITERAL1
u8x8_font_open_iconic_thing_8x8 LITERAL1
u8x8_font_open_iconic_weather_8x8 LITERAL1
u8g2_font_streamline_all_t LITERAL1
u8g2_font_streamline_building_real_estate_t LITERAL1
u8g2_font_streamline_business_t LITERAL1
u8g2_font_streamline_coding_apps_websites_t LITERAL1
u8g2_font_streamline_computers_devices_electronics_t LITERAL1
u8g2_font_streamline_content_files_t LITERAL1
u8g2_font_streamline_design_t LITERAL1
u8g2_font_streamline_ecology_t LITERAL1
u8g2_font_streamline_email_t LITERAL1
u8g2_font_streamline_entertainment_events_hobbies_t LITERAL1
u8g2_font_streamline_food_drink_t LITERAL1
u8g2_font_streamline_hand_signs_t LITERAL1
u8g2_font_streamline_health_beauty_t LITERAL1
u8g2_font_streamline_interface_essential_action_t LITERAL1
u8g2_font_streamline_interface_essential_alert_t LITERAL1
u8g2_font_streamline_interface_essential_audio_t LITERAL1
u8g2_font_streamline_interface_essential_calendar_t LITERAL1
u8g2_font_streamline_interface_essential_chart_t LITERAL1
u8g2_font_streamline_interface_essential_circle_triangle_t LITERAL1
u8g2_font_streamline_interface_essential_cog_t LITERAL1
u8g2_font_streamline_interface_essential_cursor_t LITERAL1
u8g2_font_streamline_interface_essential_dial_pad_t LITERAL1
u8g2_font_streamline_interface_essential_edit_t LITERAL1
u8g2_font_streamline_interface_essential_expand_shrink_t LITERAL1
u8g2_font_streamline_interface_essential_eye_t LITERAL1
u8g2_font_streamline_interface_essential_file_t LITERAL1
u8g2_font_streamline_interface_essential_help_t LITERAL1
u8g2_font_streamline_interface_essential_hierarchy_t LITERAL1
u8g2_font_streamline_interface_essential_home_menu_t LITERAL1
u8g2_font_streamline_interface_essential_id_t LITERAL1
u8g2_font_streamline_interface_essential_key_lock_t LITERAL1
u8g2_font_streamline_interface_essential_link_t LITERAL1
u8g2_font_streamline_interface_essential_loading_t LITERAL1
u8g2_font_streamline_interface_essential_login_t LITERAL1
u8g2_font_streamline_interface_essential_other_t LITERAL1
u8g2_font_streamline_interface_essential_paginate_t LITERAL1
u8g2_font_streamline_interface_essential_search_t LITERAL1
u8g2_font_streamline_interface_essential_setting_t LITERAL1
u8g2_font_streamline_interface_essential_share_t LITERAL1
u8g2_font_streamline_interface_essential_text_t LITERAL1
u8g2_font_streamline_interface_essential_wifi_t LITERAL1
u8g2_font_streamline_interface_essential_zoom_t LITERAL1
u8g2_font_streamline_internet_network_t LITERAL1
u8g2_font_streamline_logo_t LITERAL1
u8g2_font_streamline_map_navigation_t LITERAL1
u8g2_font_streamline_money_payments_t LITERAL1
u8g2_font_streamline_music_audio_t LITERAL1
u8g2_font_streamline_pet_animals_t LITERAL1
u8g2_font_streamline_phone_t LITERAL1
u8g2_font_streamline_photography_t LITERAL1
u8g2_font_streamline_romance_t LITERAL1
u8g2_font_streamline_school_science_t LITERAL1
u8g2_font_streamline_shopping_shipping_t LITERAL1
u8g2_font_streamline_social_rewards_t LITERAL1
u8g2_font_streamline_technology_t LITERAL1
u8g2_font_streamline_transportation_t LITERAL1
u8g2_font_streamline_travel_wayfinding_t LITERAL1
u8g2_font_streamline_users_t LITERAL1
u8g2_font_streamline_video_movies_t LITERAL1
u8g2_font_streamline_weather_t LITERAL1
u8g2_font_profont10_tf LITERAL1
u8g2_font_profont10_tr LITERAL1
u8g2_font_profont10_tn LITERAL1
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=U8g2
version=2.30.1
version=2.31.1
author=oliver <olikraus@gmail.com>
maintainer=oliver <olikraus@gmail.com>
sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1320, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1617, UC1638, UC1701, ST7511, ST7528, ST7565, ST7567, ST7571, ST7586, ST7588, ST75256, ST75320, NT7534, ST7920, IST3020, IST7920, LD7032, KS0108, KS0713, HD44102, T7932, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel.
Expand Down
22 changes: 14 additions & 8 deletions src/clib/mui.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ extern "C" {
typedef struct mui_struct mui_t;
typedef const struct muif_struct muif_t;
typedef uint8_t (*muif_cb)(mui_t *ui, uint8_t msg);
typedef const char fds_t; // form/field definition string
//typedef const char fds_t MUI_PROGMEM; // will work but instead MUI_PROGMEM should be added explicitly
typedef const char fds_t MUI_PROGMEM;



Expand All @@ -119,9 +118,15 @@ struct muif_struct
uint8_t extra;
void *data; // might be a pointer to a variable
muif_cb cb; // callback
};
} MUI_PROGMEM;

#define MUIF(id,cflags,data,cb) { id[0], id[1], cflags, 0, data, cb}
#define MUIF_STYLE(n,cb) MUIF("S" #n, 0, 0, cb)
#define MUIF_RO(id,cb) MUIF(id,0, 0,cb)
#define MUIF_LABEL(cb) MUIF(".L",0, 0,cb)
#define MUIF_GOTO(cb) MUIF(".G",MUIF_CFLAG_IS_CURSOR_SELECTABLE,0,cb)
#define MUIF_BUTTON(id,cb) MUIF(id,MUIF_CFLAG_IS_CURSOR_SELECTABLE,0,cb)
#define MUIF_VARIABLE(id,var,cb) MUIF(id,MUIF_CFLAG_IS_CURSOR_SELECTABLE,(var),cb)

/* assumes that pointers are 16 bit so encapusalte the wread i another ifdef __AVR__ */
#if defined(__GNUC__) && defined(__AVR__)
Expand Down Expand Up @@ -179,6 +184,11 @@ struct mui_struct
fds_t *touch_focus_fds; // the field which has touch focus

fds_t *token; // current token position

uint16_t form_scroll_total; // reserved for MUIF, not used by mui
uint16_t form_scroll_top; // reserved for MUIF, not used by mui
uint8_t form_scroll_visible; // reserved for MUIF, not used by mui


//uint8_t selected_value; // This variable is not used by the user interface but can be used by any field function
uint8_t tmp8;
Expand All @@ -188,10 +198,6 @@ struct mui_struct
/* current field/style variables */
//uint8_t cursor_focus_position; // the index of the field which has focus, can be used as last argument for mui_EnterForm

uint8_t form_scroll_total; // reserved for MUIF, not used by mui
uint8_t form_scroll_top; // reserved for MUIF, not used by mui
uint8_t form_scroll_visible; // reserved for MUIF, not used by mui

uint8_t delimiter; // outer delimiter of the text part of a field
uint8_t cmd; // current cmd or field (e.g. U or F)
uint8_t id0; // identifier of the field, manually provided or derived (G cmd has fixed id "FG")
Expand All @@ -212,7 +218,7 @@ struct mui_struct
/* last form and field */
uint8_t last_form_id;
uint8_t last_form_cursor_focus_position;
};
} ;

#define mui_IsCursorFocus(mui) ((mui)->dflags & MUIF_DFLAG_IS_CURSOR_FOCUS)
#define mui_IsTouchFocus(mui) ((mui)->dflags & MUIF_CFLAG_IS_TOUCH_SELECTABLE)
Expand Down
Loading

0 comments on commit 6256e85

Please sign in to comment.