@@ -11,7 +11,7 @@ provided by the ESP-IDF framework, along with constants defined in the
1111framework's include files (such as ``RTC_GPIO_IN_REG ``), to make reading
1212and writing from/to peripheral registers much easier.
1313
14- In order to do this the preprocessor has two capabilities:
14+ In order to do this, the preprocessor has two capabilities:
1515
16161. Parse and replace identifiers defined with ``#define ``
17172. Recognise the ``WRITE_RTC_* `` and ``READ_RTC_* `` macros and expand
@@ -21,7 +21,7 @@ In order to do this the preprocessor has two capabilities:
2121Usage
2222------------------------
2323
24- Normally the assembler is called as follows
24+ Normally the assembler is called as follows:
2525
2626.. code-block :: python
2727
@@ -49,8 +49,8 @@ Using a "Defines Database"
4949Because the micropython-esp32-ulp assembler was built for running on the ESP32
5050microcontroller with limited RAM, the preprocessor aims to work there too.
5151
52- To handle large number of defined constants (such as the ``RTC_* `` constants from
53- the ESP-IDF) the preprocessor can use a database (based on BerkleyDB ) stored on the
52+ To handle a large number of defined constants (such as the ``RTC_* `` constants from
53+ the ESP-IDF) the preprocessor can use a database (based on Berkeley DB ) stored on the
5454device's filesystem for looking up defines.
5555
5656The database needs to be populated before preprocessing. (Usually, when only using
@@ -67,7 +67,7 @@ are not needed on the device either.)
6767 database from include files. The resulting file will be called
6868 ``defines.db ``.
6969
70- (The following assume running on a PC. To do this on device, refer to the
70+ (The following assumes running on a PC. To do this on device, refer to the
7171 `esp32_ulp/parse_to_db.py <../esp32_ulp/parse_to_db.py >`_ file.)
7272
7373 .. code-block :: bash
@@ -83,22 +83,22 @@ are not needed on the device either.)
8383
8484 # if file system space is not a concern, the following can be convenient
8585 # by including all relevant include files from the ESP-IDF framework.
86- # This results in an approximately 2MB large database.
86+ # This results in an approximately 2 MB large database.
8787 micropython -m esp32_ulp.parse_to_db \
8888 esp-idf/components/soc/esp32/include/soc/* .h \
8989 esp-idf/components/esp_common/include/* .h
9090
9191 # most ULP code uses only 5 include files. Parsing only those into the
9292 # database should thus allow assembling virtually all ULP code one would
9393 # find or want to write.
94- # This results in an approximately 250kB large database.
94+ # This results in an approximately 250 kB large database.
9595 micropython -m esp32_ulp.parse_to_db \
9696 esp-idf/components/soc/esp32/include/soc/{soc,soc_ulp,rtc_cntl_reg,rtc_io_reg,sens_reg}.h
9797
9898
9999 .. warning ::
100100
101- ` :warning: ` Ensure that you include the header files for the correct
101+ Ensure that you include the header files for the correct
102102 variant you are working with. In the example code above, simply switch
103103 ``esp32 `` to ``esp32s2 `` or ``esp32s3 `` in the path to the include files.
104104
@@ -118,7 +118,7 @@ are not needed on the device either.)
118118 is taken not to create an empty database file, cluttering up the filesystem,
119119 when not needed).
120120
121- If you do not want the preprocessor use use a DefinesDB, pass ``False `` to
121+ If you do not want the preprocessor to use a DefinesDB, pass ``False `` to
122122 the ``use_defines_db `` argument of the ``preprocess `` convenience function,
123123 or instantiate the ``Preprocessor `` class directly, without passing it a
124124 DefinesDB instance via ``use_db ``.
@@ -129,7 +129,7 @@ Design choices
129129
130130The preprocessor does not support:
131131
132- 1. Function style macros such as :code: `#define f(a,b) (a+b) `
132+ 1. Function- style macros such as :code: `#define f(a,b) (a+b) `
133133
134134 This is not important, because there are only few RTC macros that need
135135 to be supported and they are simply implemented as Python functions.
0 commit comments