Merge branch 'master' of https://github.com/olikraus/u8g2
This commit is contained in:
commit
cd5b4704a8
|
@ -217,7 +217,7 @@ extern "C" uint8_t u8x8_gpio_and_delay_arduino(u8x8_t *u8x8, uint8_t msg, uint8_
|
|||
|
||||
#elif __AVR_ARCH__ == 4 || __AVR_ARCH__ == 5 || __AVR_ARCH__ == 51 || __AVR_ARCH__ == 6 || __AVR_ARCH__ == 103
|
||||
|
||||
/* this function completly replaces u8x8_byte_4wire_sw_spi*/
|
||||
/* this function completely replaces u8x8_byte_4wire_sw_spi*/
|
||||
extern "C" uint8_t u8x8_byte_arduino_3wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
uint8_t i;
|
||||
|
@ -401,7 +401,7 @@ extern "C" uint8_t u8x8_byte_arduino_3wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uin
|
|||
|
||||
#elif __AVR_ARCH__ == 4 || __AVR_ARCH__ == 5 || __AVR_ARCH__ == 51 || __AVR_ARCH__ == 6 || __AVR_ARCH__ == 103
|
||||
|
||||
/* this function completly replaces u8x8_byte_4wire_sw_spi*/
|
||||
/* this function completely replaces u8x8_byte_4wire_sw_spi*/
|
||||
extern "C" uint8_t u8x8_byte_arduino_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
uint8_t SREG_backup;
|
||||
|
@ -547,7 +547,7 @@ extern "C" uint8_t u8x8_byte_arduino_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uin
|
|||
|
||||
#elif defined(__SAM3X8E__) /* Arduino DUE */
|
||||
|
||||
/* this function completly replaces u8x8_byte_4wire_sw_spi*/
|
||||
/* this function completely replaces u8x8_byte_4wire_sw_spi*/
|
||||
extern "C" uint8_t u8x8_byte_arduino_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
uint8_t i, b;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
MUIF (Monochrome User Interface Functions)
|
||||
n: A number 0 to 9 without any quotes, e.g.: 5
|
||||
id: Exactly two characters or numbers in doubl quotes, e.g. "G5".
|
||||
id: Exactly two characters or numbers in double quotes, e.g. "G5".
|
||||
cb: A callback function with the following prototype: "uint8_t muif_cb(mui_t *ui, uint8_t msg)"
|
||||
There are MANY predefined callback functions, see separate list
|
||||
var: Address of a variable.
|
||||
|
@ -154,7 +154,7 @@ struct muif_struct
|
|||
muif_cb cb; // callback
|
||||
} MUI_PROGMEM;
|
||||
|
||||
/* assumes that pointers are 16 bit so encapusalte the wread i another ifdef __AVR__ */
|
||||
/* assumes that pointers are 16 bit so encapsulate the wread i another ifdef __AVR__ */
|
||||
#if defined(__GNUC__) && defined(__AVR__)
|
||||
# define muif_get_id0(muif) mui_pgm_read(&((muif)->id0))
|
||||
# define muif_get_id1(muif) mui_pgm_read(&((muif)->id1))
|
||||
|
|
|
@ -164,7 +164,7 @@ uint8_t mui_u8g2_u8_opt_line_wa_mud_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VAR
|
|||
uint8_t mui_u8g2_u8_opt_line_wa_mud_pf(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE,MUI_XYAT */
|
||||
|
||||
/* dropdown list / combo box */
|
||||
/* The text part of the parent defines a '|' separted list of elements, which can be selected by the child. */
|
||||
/* The text part of the parent defines a '|' separated list of elements, which can be selected by the child. */
|
||||
/* Argument is a form number where the child element is placed multiple times */
|
||||
/* The child form does not require the ok button, because the child function will return to the parent with the select element */
|
||||
uint8_t mui_u8g2_u8_opt_parent_wm_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE, MUI_XYAT */
|
||||
|
@ -174,8 +174,8 @@ uint8_t mui_u8g2_u8_opt_child_wm_pi(mui_t *ui, uint8_t msg); /* M
|
|||
/* Note: there is no opt_child_goto muif, because this can be done with mui_u8g2_goto_form_w1_pi */
|
||||
|
||||
/* (scrollable) jump menu */
|
||||
/* The text part of the parent defines a '|' separted list of elements, which can be selected goto_form functions. */
|
||||
/* Each '|' separted element must be prefixed with the form number (MUI_x) */
|
||||
/* The text part of the parent defines a '|' separated list of elements, which can be selected goto_form functions. */
|
||||
/* Each '|' separated element must be prefixed with the form number (MUI_x) */
|
||||
uint8_t mui_u8g2_goto_data(mui_t *ui, uint8_t msg); /* REF, MUIF_RO, MUI_DATA (WARNING: Must appear only once per form!!! */
|
||||
uint8_t mui_u8g2_goto_form_w1_pi(mui_t *ui, uint8_t msg); /* REF, MUIF_BUTTON, MUI_XYA */
|
||||
uint8_t mui_u8g2_goto_form_w1_pf(mui_t *ui, uint8_t msg); /* REF, MUIF_BUTTON, MUI_XYA */
|
||||
|
|
14
csrc/u8g2.h
14
csrc/u8g2.h
|
@ -62,7 +62,7 @@
|
|||
|
||||
/*
|
||||
The following macro enables 16 Bit mode.
|
||||
Without defining this macro all calulations are done with 8 Bit (1 Byte) variables.
|
||||
Without defining this macro all calculations are done with 8 Bit (1 Byte) variables.
|
||||
Especially on AVR architecture, this will save some space.
|
||||
If this macro is defined, then U8g2 will switch to 16 Bit mode.
|
||||
Use 16 Bit mode for any display with more than 240 pixel in one
|
||||
|
@ -169,7 +169,7 @@
|
|||
A frame of width 9 would place the C a little bit more to the right (width of that "C" are 6 pixel).
|
||||
If U8G2_BALANCED_STR_WIDTH_CALCULATION is defined, the width of "C" is returned as 8.
|
||||
|
||||
Not defining U8G2_BALANCED_STR_WIDTH_CALCULATION would fall back to the old bahavior.
|
||||
Not defining U8G2_BALANCED_STR_WIDTH_CALCULATION would fall back to the old behavior.
|
||||
*/
|
||||
#ifndef U8G2_NO_BALANCED_STR_WIDTH_CALCULATION
|
||||
#define U8G2_BALANCED_STR_WIDTH_CALCULATION
|
||||
|
@ -338,9 +338,9 @@ struct u8g2_struct
|
|||
u8g2_uint_t width;
|
||||
u8g2_uint_t height;
|
||||
|
||||
/* ths is the clip box for the user to check if a specific box has an intersection */
|
||||
/* this is the clip box for the user to check if a specific box has an intersection */
|
||||
/* use u8g2_IsIntersection from u8g2_intersection.c to test against this intersection */
|
||||
/* actually, this window describes the positon of the current page */
|
||||
/* actually, this window describes the position of the current page */
|
||||
u8g2_uint_t user_x0; /* left corner of the buffer */
|
||||
u8g2_uint_t user_x1; /* right corner of the buffer (excluded) */
|
||||
u8g2_uint_t user_y0; /* upper edge of the buffer */
|
||||
|
@ -445,8 +445,8 @@ extern const u8g2_cb_t u8g2_cb_mirror_vertical;
|
|||
#define U8G2_MIRROR (&u8g2_cb_mirror)
|
||||
#define U8G2_MIRROR_VERTICAL (&u8g2_cb_mirror_vertical)
|
||||
/*
|
||||
u8g2: A new, not yet initialized u8g2 memory areay
|
||||
buf: Memory are of size tile_buf_height*<width of the display in pixel>
|
||||
u8g2: A new, not yet initialized u8g2 memory area
|
||||
buf: Memory area of size tile_buf_height*<width of the display in pixel>
|
||||
tile_buf_height: Number of full lines
|
||||
ll_hvline_cb: one of:
|
||||
u8g2_ll_hvline_vertical_top_lsb
|
||||
|
@ -1532,7 +1532,7 @@ void u8g2_WriteBufferXBM2(u8g2_t *u8g2, void (*out)(const char *s));
|
|||
len length of the line in pixel, len must not be 0
|
||||
dir 0: horizontal line (left to right)
|
||||
1: vertical line (top to bottom)
|
||||
asumption:
|
||||
assumption:
|
||||
all clipping done
|
||||
*/
|
||||
|
||||
|
|
14
csrc/u8x8.h
14
csrc/u8x8.h
|
@ -34,11 +34,11 @@
|
|||
|
||||
|
||||
U8glib has several layers. Each layer is implemented with a callback function.
|
||||
This callback function handels the messages for the layer.
|
||||
This callback function handles the messages for the layer.
|
||||
|
||||
The topmost level is the display layer. It includes the following messages:
|
||||
|
||||
U8X8_MSG_DISPLAY_SETUP_MEMORY no communicaation with the display, setup memory ony
|
||||
U8X8_MSG_DISPLAY_SETUP_MEMORY no communication with the display, setup memory only
|
||||
U8X8_MSG_DISPLAY_INIT
|
||||
U8X8_MSG_DISPLAY_SET_FLIP_MODE
|
||||
U8X8_MSG_DISPLAY_SET_POWER_SAVE
|
||||
|
@ -102,7 +102,7 @@
|
|||
//#define U8X8_WITH_SET_FLIP_MODE
|
||||
|
||||
/* Select 0 or 1 for the default flip mode. This is not affected by U8X8_WITH_FLIP_MODE */
|
||||
/* Note: Not all display types support a mirror functon for the frame buffer */
|
||||
/* Note: Not all display types support a mirror function for the frame buffer */
|
||||
/* 26 May 2016: Obsolete */
|
||||
//#define U8X8_DEFAULT_FLIP_MODE 0
|
||||
|
||||
|
@ -352,7 +352,7 @@ struct u8x8_struct
|
|||
uint16_t encoding; /* encoding result for utf8 decoder in next_cb */
|
||||
uint8_t x_offset; /* copied from info struct, can be modified in flip mode */
|
||||
uint8_t is_font_inverse_mode; /* 0: normal, 1: font glyphs are inverted */
|
||||
uint8_t i2c_address; /* a valid i2c adr. Initially this is 255, but this is set to something usefull during DISPLAY_INIT */
|
||||
uint8_t i2c_address; /* a valid i2c adr. Initially this is 255, but this is set to something useful during DISPLAY_INIT */
|
||||
/* i2c_address is the address for writing data to the display */
|
||||
/* usually, the lowest bit must be zero for a valid address */
|
||||
uint8_t i2c_started; /* for i2c interface */
|
||||
|
@ -367,7 +367,7 @@ struct u8x8_struct
|
|||
void *user_ptr;
|
||||
#endif
|
||||
#ifdef U8X8_USE_PINS
|
||||
uint8_t pins[U8X8_PIN_CNT]; /* defines a pinlist: Mainly a list of pins for the Arduino Envionment, use U8X8_PIN_xxx to access */
|
||||
uint8_t pins[U8X8_PIN_CNT]; /* defines a pinlist: Mainly a list of pins for the Arduino Environment, use U8X8_PIN_xxx to access */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -416,7 +416,7 @@ struct u8log_struct
|
|||
void *aux_data; /* pointer to u8x8 or u8g2 */
|
||||
uint8_t width, height; /* size of the terminal */
|
||||
u8log_cb cb; /* callback redraw function */
|
||||
uint8_t *screen_buffer; /* size must be width*heigh bytes */
|
||||
uint8_t *screen_buffer; /* size must be width*height bytes */
|
||||
uint8_t is_redraw_line_for_each_char;
|
||||
int8_t line_height_offset; /* extra offset for the line height (u8g2 only) */
|
||||
|
||||
|
@ -477,7 +477,7 @@ void u8x8_d_helper_display_init(u8x8_t *u8g2);
|
|||
Name: U8X8_MSG_DISPLAY_SET_FLIP_MODE
|
||||
Args: arg_int: 0: normal mode, 1: flipped HW screen (180 degree)
|
||||
Tasks:
|
||||
Reprogramms the display controller to rotate the display by
|
||||
Reprograms the display controller to rotate the display by
|
||||
180 degree (arg_int = 1) or not (arg_int = 0)
|
||||
This may change u8g2->x_offset if the display is smaller than the controller ram
|
||||
This message should only be supported if U8X8_WITH_FLIP_MODE is defined.
|
||||
|
|
Loading…
Reference in New Issue