summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-10-12 15:45:51 -0700
committerGitHub <noreply@github.com>2020-10-12 15:45:51 -0700
commit1eb1434fc968cb05e3cfd69b40434331404ef5df (patch)
tree9debd04252cb41c3de1de1e3a22fa3735bd9af90 /shared-module
parent179e13f103ea8a083a5886608f669682f367b039 (diff)
parent5e38bb98cbcc2d1ab607b19d11e628def4f48f4c (diff)
Merge pull request #3537 from jepler/update-protomatter-2
rgbmatrix: update protomatter to 1.0.5 tag
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/rgbmatrix/RGBMatrix.c12
-rw-r--r--shared-module/rgbmatrix/RGBMatrix.h2
-rw-r--r--shared-module/rgbmatrix/allocator.h4
3 files changed, 9 insertions, 9 deletions
diff --git a/shared-module/rgbmatrix/RGBMatrix.c b/shared-module/rgbmatrix/RGBMatrix.c
index abd6d500f..94c3eda27 100644
--- a/shared-module/rgbmatrix/RGBMatrix.c
+++ b/shared-module/rgbmatrix/RGBMatrix.c
@@ -78,10 +78,10 @@ void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self,
// verify that the matrix is big enough
mp_get_index(mp_obj_get_type(self->framebuffer), self->bufinfo.len, MP_OBJ_NEW_SMALL_INT(self->bufsize-1), false);
} else {
- _PM_FREE(self->bufinfo.buf);
- _PM_FREE(self->protomatter.rgbPins);
- _PM_FREE(self->protomatter.addr);
- _PM_FREE(self->protomatter.screenData);
+ _PM_free(self->bufinfo.buf);
+ _PM_free(self->protomatter.rgbPins);
+ _PM_free(self->protomatter.addr);
+ _PM_free(self->protomatter.screenData);
self->framebuffer = NULL;
self->bufinfo.buf = common_hal_rgbmatrix_allocator_impl(self->bufsize);
@@ -164,13 +164,13 @@ void common_hal_rgbmatrix_rgbmatrix_deinit(rgbmatrix_rgbmatrix_obj_t* self) {
free_pin(&self->oe_pin);
if (self->protomatter.rgbPins) {
- _PM_free(&self->protomatter);
+ _PM_deallocate(&self->protomatter);
}
memset(&self->protomatter, 0, sizeof(self->protomatter));
// If it was supervisor-allocated, it is supervisor-freed and the pointer
// is zeroed, otherwise the pointer is just zeroed
- _PM_FREE(self->bufinfo.buf);
+ _PM_free(self->bufinfo.buf);
self->base.type = NULL;
// If a framebuffer was passed in to the constructor, NULL the reference
diff --git a/shared-module/rgbmatrix/RGBMatrix.h b/shared-module/rgbmatrix/RGBMatrix.h
index 19d7d5f2e..6dbc6fd41 100644
--- a/shared-module/rgbmatrix/RGBMatrix.h
+++ b/shared-module/rgbmatrix/RGBMatrix.h
@@ -26,7 +26,7 @@
#pragma once
-#include "lib/protomatter/core.h"
+#include "lib/protomatter/src/core.h"
extern const mp_obj_type_t rgbmatrix_RGBMatrix_type;
typedef struct {
diff --git a/shared-module/rgbmatrix/allocator.h b/shared-module/rgbmatrix/allocator.h
index 323fa5ec0..3431046d5 100644
--- a/shared-module/rgbmatrix/allocator.h
+++ b/shared-module/rgbmatrix/allocator.h
@@ -31,7 +31,7 @@
#include "py/misc.h"
#include "supervisor/memory.h"
-#define _PM_ALLOCATOR common_hal_rgbmatrix_allocator_impl
-#define _PM_FREE(x) (common_hal_rgbmatrix_free_impl((x)), (x)=NULL, (void)0)
+#define _PM_allocate common_hal_rgbmatrix_allocator_impl
+#define _PM_free(x) (common_hal_rgbmatrix_free_impl((x)), (x)=NULL, (void)0)
extern void *common_hal_rgbmatrix_allocator_impl(size_t sz);
extern void common_hal_rgbmatrix_free_impl(void *);