From 61da6754a01a99d227c3d2dbaa484a17881dc0d7 Mon Sep 17 00:00:00 2001 From: ailurux Date: Thu, 20 Feb 2025 14:57:11 +1100 Subject: Add nvs key for left padding --- src/drivers/include/drivers/nvs.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/drivers/include') diff --git a/src/drivers/include/drivers/nvs.hpp b/src/drivers/include/drivers/nvs.hpp index e3a105f8..e548fcea 100644 --- a/src/drivers/include/drivers/nvs.hpp +++ b/src/drivers/include/drivers/nvs.hpp @@ -93,6 +93,9 @@ class NvsStorage { auto FastCharge() -> bool; auto FastCharge(bool) -> void; + auto DisplayLeftPadding() -> uint8_t; + auto DisplayLeftPadding(uint8_t) -> void; + auto PreferredBluetoothDevice() -> std::optional; auto PreferredBluetoothDevice(std::optional) -> void; @@ -174,6 +177,7 @@ class NvsStorage { Setting lock_polarity_; Setting display_cols_; Setting display_rows_; + Setting display_left_padding_; Setting haptic_motor_type_; Setting lra_calibration_; Setting fast_charge_; -- cgit v1.2.3 From 830e000fcb31544697cbfb42692c7a49e06e14e7 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 20 Feb 2025 15:50:26 +1100 Subject: Support a left padding value in display init data --- src/drivers/include/drivers/display.hpp | 4 +++- src/drivers/include/drivers/display_init.hpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/drivers/include') diff --git a/src/drivers/include/drivers/display.hpp b/src/drivers/include/drivers/display.hpp index e5001c48..88bb07c4 100644 --- a/src/drivers/include/drivers/display.hpp +++ b/src/drivers/include/drivers/display.hpp @@ -34,7 +34,7 @@ class Display { static auto Create(IGpios& expander, const displays::InitialisationData& init_data) -> Display*; - Display(IGpios& gpio, spi_device_handle_t handle); + Display(IGpios& gpio, spi_device_handle_t handle, uint_fast8_t pad); ~Display(); auto SetDisplayOn(bool) -> void; @@ -54,6 +54,7 @@ class Display { bool first_flush_finished_; bool display_on_; uint_fast8_t brightness_; + uint_fast8_t pad_; lv_display_t* display_ = nullptr; @@ -63,6 +64,7 @@ class Display { }; void SendInitialisationSequence(const uint8_t* data); + void WriteLeftPad(uint8_t *buffer); void SendCommandWithData(uint8_t command, const uint8_t* data, size_t length); diff --git a/src/drivers/include/drivers/display_init.hpp b/src/drivers/include/drivers/display_init.hpp index 9bf5b3f5..6ccdb417 100644 --- a/src/drivers/include/drivers/display_init.hpp +++ b/src/drivers/include/drivers/display_init.hpp @@ -17,6 +17,7 @@ extern const uint8_t kDelayBit; struct InitialisationData { uint16_t width; uint16_t height; + uint8_t pad; uint8_t num_sequences; const uint8_t* sequences[4]; }; -- cgit v1.2.3