summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/_protomatter/Protomatter.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/shared-module/_protomatter/Protomatter.c b/shared-module/_protomatter/Protomatter.c
index 59dac3e6d..9f67bfad3 100644
--- a/shared-module/_protomatter/Protomatter.c
+++ b/shared-module/_protomatter/Protomatter.c
@@ -180,3 +180,15 @@ void protomatter_protomatter_collect_ptrs(protomatter_protomatter_obj_t* self) {
gc_collect_ptr(self->core.screenData);
}
+void common_hal_protomatter_protomatter_set_paused(protomatter_protomatter_obj_t* self, bool paused) {
+ if (paused && !self->paused) {
+ _PM_stop(&self->core);
+ } else if (!paused && self->paused) {
+ _PM_resume(&self->core);
+ }
+ self->paused = paused;
+}
+
+bool common_hal_protomatter_protomatter_get_paused(protomatter_protomatter_obj_t* self) {
+ return self->paused;
+}