From 1ecdb405cccb47b65d2be4a4861e9cc857912e03 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 14 Jan 2021 14:02:15 +0100 Subject: [PATCH 1/3] Added compatibility to use as esp-idf component --- CMakeLists.txt | 9 +++++++++ component.mk | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 component.mk diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..7373ef0 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,9 @@ +set(COMPONENT_SRCDIRS + "." +) + +set(COMPONENT_ADD_INCLUDEDIRS + "." +) + +register_component() \ No newline at end of file diff --git a/component.mk b/component.mk new file mode 100644 index 0000000..7fa03eb --- /dev/null +++ b/component.mk @@ -0,0 +1,2 @@ +COMPONENT_ADD_INCLUDEDIRS := . +COMPONENT_SRCDIRS := . \ No newline at end of file From bb30d0eead113d4b6e6fe232a5180a8b0e5ee8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6pfinger?= Date: Sat, 20 Jan 2024 01:04:19 +0100 Subject: [PATCH 2/3] Refactor semaphore handling and fix block_linear_index initialization - Refactored the semaphore handling in `PxMatrix.h` to use `SemaphoreHandle_t` instead of `xSemaphoreHandle`. - Fixed the initialization of `block_linear_index` in the `fillMatrixBuffer` function. --- PxMatrix.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PxMatrix.h b/PxMatrix.h index 74759f6..8655d34 100644 --- a/PxMatrix.h +++ b/PxMatrix.h @@ -96,7 +96,7 @@ BSD license, check license.txt for more information struct spi_struct_t { spi_dev_t * dev; #if !CONFIG_DISABLE_HAL_LOCKS - xSemaphoreHandle lock; + SemaphoreHandle_t lock; #endif uint8_t num; }; @@ -777,7 +777,7 @@ inline void PxMATRIX::fillMatrixBuffer(int16_t x, int16_t y, uint8_t r, uint8_t // invert block_y so remaining translation will be more sane uint8_t block_y_inv = 1 - block_y; uint8_t block_x_inv = blocks_x_per_panel - block_x - 1; - uint8_t block_linear_index; + uint8_t block_linear_index = 0; if (_scan_pattern==WZAGZIG2) { block_linear_index = block_x_inv * 2 + block_y; } @@ -1494,4 +1494,4 @@ void PxMATRIX::clearDisplay(bool selected_buffer) { #endif } -#endif \ No newline at end of file +#endif From 0f0dcac8a428c35bf7974fc4f37681bba62c5d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6pfinger?= Date: Sat, 20 Jan 2024 01:10:05 +0100 Subject: [PATCH 3/3] Refactor CMakeLists.txt for better organization and readability The commit refactors the CMakeLists.txt file by removing unnecessary code and improving its organization. This change aims to enhance the readability of the file and make it easier to maintain in the future. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7373ef0..7095000 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,4 @@ -set(COMPONENT_SRCDIRS - "." -) + set(COMPONENT_ADD_INCLUDEDIRS "."