From 2842945e760c98793cb0c62a66345ab8850afc1a Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 17 Sep 2014 23:27:42 +0000 Subject: [PATCH] stmhal: Fix bugs in documentation so it compiles. --- stmhal/irq.c | 2 ++ stmhal/modselect.c | 2 +- stmhal/modwiznet5k.c | 2 ++ tools/gendoc.py | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/stmhal/irq.c b/stmhal/irq.c index c08f2fe094..286af73cc1 100644 --- a/stmhal/irq.c +++ b/stmhal/irq.c @@ -33,6 +33,8 @@ #include MICROPY_HAL_H +/// \moduleref pyb + /// \function wfi() /// Wait for an interrupt. /// This executies a `wfi` instruction which reduces power consumption diff --git a/stmhal/modselect.c b/stmhal/modselect.c index 6594ad2180..bad535f210 100644 --- a/stmhal/modselect.c +++ b/stmhal/modselect.c @@ -174,7 +174,7 @@ STATIC mp_obj_t select_select(uint n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_select_obj, 3, 4, select_select); -/// \class Poll +/// \class Poll - poll class typedef struct _mp_obj_poll_t { mp_obj_base_t base; diff --git a/stmhal/modwiznet5k.c b/stmhal/modwiznet5k.c index e45c9d53e9..3996c29944 100644 --- a/stmhal/modwiznet5k.c +++ b/stmhal/modwiznet5k.c @@ -168,6 +168,8 @@ STATIC mp_obj_t format_net_addr(uint8_t *ip, mp_uint_t port) { /******************************************************************************/ // Micro Python bindings +/// \class WIZnet5k - driver for WIZnet5x00 Ethernet modules + STATIC void wiznet5k_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) { print(env, "WIZnet5k()"); } diff --git a/tools/gendoc.py b/tools/gendoc.py index 26c3a18596..bd2dbe1b57 100644 --- a/tools/gendoc.py +++ b/tools/gendoc.py @@ -347,7 +347,7 @@ class Doc: regex_descr = r'(?P.*)' doc_regexs = ( - (Doc.process_module, re.compile(r'\\module (?P[a-z]+) - ' + regex_descr + r'$')), + (Doc.process_module, re.compile(r'\\module (?P[a-z][a-z0-9]*) - ' + regex_descr + r'$')), (Doc.process_moduleref, re.compile(r'\\moduleref (?P[a-z]+)$')), (Doc.process_function, re.compile(r'\\function (?P[a-z0-9_]+)(?P\(.*\))$')), (Doc.process_classmethod, re.compile(r'\\classmethod (?P\\?[a-z0-9_]+)(?P\(.*\))$')),