From c27f3fccf870a7f6f268b29ed54f8aab1d9ea5d9 Mon Sep 17 00:00:00 2001
From: fgross <florian.gross@snowflake.com>
Date: Wed, 13 Nov 2019 12:52:36 +0100
Subject: [PATCH] feat(pycardium): Enable framebuf module

The framebuf module provides a framebuffer implementation running purely
in MicroPython which will increase drawing performance by a lot.  A
follow-up change will be necessary to connect this framebuffer
implementation to the display API.

This commit is implements a part of MR !211.
---
 Documentation/pycardium/stdlib.rst | 8 ++++++++
 pycardium/mpconfigport.h           | 1 +
 2 files changed, 9 insertions(+)

diff --git a/Documentation/pycardium/stdlib.rst b/Documentation/pycardium/stdlib.rst
index 702dfff3..1d1b7af4 100644
--- a/Documentation/pycardium/stdlib.rst
+++ b/Documentation/pycardium/stdlib.rst
@@ -3,6 +3,14 @@ MicroPython Standard Library
 Pycardium contains some modules from the MicroPython standard library.  These
 are:
 
+.. py:module:: framebuf
+
+``framebuf``
+------------
+Refer to the official `MicroPython docs for framebuf`_.
+
+.. _MicroPython docs for framebuf: https://docs.micropython.org/en/latest/library/framebuf.html
+
 .. py:module:: ubinascii
 
 ``ubinascii``
diff --git a/pycardium/mpconfigport.h b/pycardium/mpconfigport.h
index a5c3456c..242c6a52 100644
--- a/pycardium/mpconfigport.h
+++ b/pycardium/mpconfigport.h
@@ -45,6 +45,7 @@ int mp_hal_trng_read_int(void);
 #define MICROPY_PY_UTIME_MP_HAL             (1)
 #define MICROPY_PY_IO_FILEIO                (1)
 #define MICROPY_PY_UERRNO                   (1)
+#define MICROPY_PY_FRAMEBUF                 (1)
 
 /* Modules */
 #define MODULE_BHI160_ENABLED               (1)
-- 
GitLab