Merge pull request #5205 from jepler/deprecate-vertical-scroll
Deprecate Display's constructor arg set_vertical_scroll
This commit is contained in:
commit
6d49a9f0c5
@ -100,7 +100,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA00,
|
||||
|
@ -80,7 +80,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PB14, // backlight pin
|
||||
|
@ -81,7 +81,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA23, // backlight pin
|
||||
|
@ -133,7 +133,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
NULL, // backlight pin
|
||||
|
@ -103,7 +103,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA01, // backlight pin
|
||||
|
@ -103,7 +103,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA01, // backlight pin
|
||||
|
@ -90,7 +90,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // Set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PB31, // Backlight pin
|
||||
|
@ -107,7 +107,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // Set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PB31, // Backlight pin
|
||||
|
@ -98,7 +98,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PC05, // backlight pin
|
||||
|
@ -100,7 +100,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
NULL,
|
||||
|
@ -94,7 +94,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_GPIO7, // backlight pin
|
||||
|
@ -97,7 +97,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_GPIO21, // backlight pin
|
||||
|
@ -113,7 +113,6 @@ static void display_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_GPIO33, // backlight pin
|
||||
|
@ -198,7 +198,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
NULL, // There is no backlight pin, defined for now.
|
||||
|
@ -80,7 +80,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_P1_05, // backlight pin
|
||||
|
@ -81,7 +81,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_P1_13, // backlight pin
|
||||
|
@ -81,7 +81,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_P0_20, // backlight pin
|
||||
|
@ -80,7 +80,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_P0_02, // backlight pin
|
||||
|
@ -91,7 +91,6 @@ void board_init(void) {
|
||||
0, // Set column command
|
||||
0, // Set row command
|
||||
0, // Write memory command
|
||||
0xd3, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
NULL,
|
||||
|
@ -100,7 +100,6 @@ void board_init(void) {
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
|
||||
0x37, // set vertical scroll command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PB03,
|
||||
|
@ -54,7 +54,7 @@
|
||||
//| Most people should not use this class directly. Use a specific display driver instead that will
|
||||
//| contain the initialization sequence at minimum."""
|
||||
//|
|
||||
//| def __init__(self, display_bus: _DisplayBus, init_sequence: ReadableBuffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, set_vertical_scroll: int = 0, backlight_pin: Optional[microcontroller.Pin] = None, brightness_command: Optional[int] = None, brightness: float = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60, backlight_on_high: bool = True, SH1107_addressing: bool = False) -> None:
|
||||
//| def __init__(self, display_bus: _DisplayBus, init_sequence: ReadableBuffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, backlight_pin: Optional[microcontroller.Pin] = None, brightness_command: Optional[int] = None, brightness: float = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60, backlight_on_high: bool = True, SH1107_addressing: bool = False) -> None:
|
||||
//| r"""Create a Display object on the given display bus (`FourWire`, `ParallelBus` or `I2CDisplay`).
|
||||
//|
|
||||
//| The ``init_sequence`` is bitpacked to minimize the ram impact. Every command begins with a
|
||||
@ -100,7 +100,6 @@
|
||||
//| :param int set_column_command: Command used to set the start and end columns to update
|
||||
//| :param int set_row_command: Command used so set the start and end rows to update
|
||||
//| :param int write_ram_command: Command used to write pixels values into the update region. Ignored if data_as_commands is set.
|
||||
//| :param int set_vertical_scroll: Command used to set the first row to show
|
||||
//| :param microcontroller.Pin backlight_pin: Pin connected to the display's backlight
|
||||
//| :param int brightness_command: Command to set display brightness. Usually available in OLED controllers.
|
||||
//| :param float brightness: Initial display brightness. This value is ignored if auto_brightness is True.
|
||||
@ -111,6 +110,7 @@
|
||||
//| :param int native_frames_per_second: Number of display refreshes per second that occur with the given init_sequence.
|
||||
//| :param bool backlight_on_high: If True, pulling the backlight pin high turns the backlight on.
|
||||
//| :param bool SH1107_addressing: Special quirk for SH1107, use upper/lower column set and page set
|
||||
//| :param int set_vertical_scroll: This parameter is accepted but ignored for backwards compatibility. It will be removed in a future release.
|
||||
//| """
|
||||
//| ...
|
||||
//|
|
||||
@ -184,7 +184,6 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a
|
||||
args[ARG_reverse_bytes_in_word].u_bool,
|
||||
args[ARG_set_column_command].u_int, args[ARG_set_row_command].u_int,
|
||||
args[ARG_write_ram_command].u_int,
|
||||
args[ARG_set_vertical_scroll].u_int,
|
||||
bufinfo.buf, bufinfo.len,
|
||||
MP_OBJ_TO_PTR(backlight_pin),
|
||||
args[ARG_brightness_command].u_int,
|
||||
|
@ -42,7 +42,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
|
||||
mp_obj_t bus, uint16_t width, uint16_t height,
|
||||
int16_t colstart, int16_t rowstart, uint16_t rotation, uint16_t color_depth, bool grayscale,
|
||||
bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word,
|
||||
uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command, uint8_t set_vertical_scroll,
|
||||
uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command,
|
||||
uint8_t *init_sequence, uint16_t init_sequence_len, const mcu_pin_obj_t *backlight_pin, uint16_t brightness_command,
|
||||
mp_float_t brightness, bool auto_brightness,
|
||||
bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second,
|
||||
|
@ -45,7 +45,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
|
||||
mp_obj_t bus, uint16_t width, uint16_t height, int16_t colstart, int16_t rowstart,
|
||||
uint16_t rotation, uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row,
|
||||
uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word, uint8_t set_column_command,
|
||||
uint8_t set_row_command, uint8_t write_ram_command, uint8_t set_vertical_scroll,
|
||||
uint8_t set_row_command, uint8_t write_ram_command,
|
||||
uint8_t *init_sequence, uint16_t init_sequence_len, const mcu_pin_obj_t *backlight_pin,
|
||||
uint16_t brightness_command, mp_float_t brightness, bool auto_brightness,
|
||||
bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second,
|
||||
|
Loading…
Reference in New Issue
Block a user