From c45e641c1de2d7ad44cbe584377de7c92fb4d762 Mon Sep 17 00:00:00 2001 From: danicampora Date: Thu, 19 Mar 2015 14:41:34 +0100 Subject: [PATCH] cc3200: Re-name pybsystick to mpsystick. --- cc3200/application.mk | 2 +- cc3200/misc/help.c | 6 ++---- cc3200/{mods/pybsystick.c => misc/mpsystick.c} | 2 +- cc3200/{mods/pybsystick.h => misc/mpsystick.h} | 5 +++++ 4 files changed, 9 insertions(+), 6 deletions(-) rename cc3200/{mods/pybsystick.c => misc/mpsystick.c} (99%) rename cc3200/{mods/pybsystick.h => misc/mpsystick.h} (95%) diff --git a/cc3200/application.mk b/cc3200/application.mk index c737baaa50..04bec7b834 100644 --- a/cc3200/application.mk +++ b/cc3200/application.mk @@ -79,6 +79,7 @@ APP_MISC_SRC_C = $(addprefix misc/,\ mpcallback.c \ mperror.c \ mpexception.c \ + mpsystick.c \ pin_defs_cc3200.c \ ) @@ -95,7 +96,6 @@ APP_MODS_SRC_C = $(addprefix mods/,\ pybrtc.c \ pybsd.c \ pybsleep.c \ - pybsystick.c \ pybuart.c \ pybwdt.c \ ) diff --git a/cc3200/misc/help.c b/cc3200/misc/help.c index c681d49452..0059a4002a 100644 --- a/cc3200/misc/help.c +++ b/cc3200/misc/help.c @@ -46,10 +46,9 @@ STATIC mp_obj_t pyb_help(uint n_args, const mp_obj_t *args) { if (n_args == 0) { // print a general help message printf("%s", help_text); - - } else { + } + else { // try to print something sensible about the given object - printf("object "); mp_obj_print(args[0], PRINT_STR); printf(" is of type %s\n", mp_obj_get_type_str(args[0])); @@ -76,7 +75,6 @@ STATIC mp_obj_t pyb_help(uint n_args, const mp_obj_t *args) { } } } - return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_help_obj, 0, 1, pyb_help); diff --git a/cc3200/mods/pybsystick.c b/cc3200/misc/mpsystick.c similarity index 99% rename from cc3200/mods/pybsystick.c rename to cc3200/misc/mpsystick.c index 0bc80f5b5e..5eeeae21ea 100644 --- a/cc3200/mods/pybsystick.c +++ b/cc3200/misc/mpsystick.c @@ -29,7 +29,7 @@ #include MICROPY_HAL_H #include "py/obj.h" #include "irq.h" -#include "pybsystick.h" +#include "mpsystick.h" #include "systick.h" #include "inc/hw_types.h" #include "inc/hw_nvic.h" diff --git a/cc3200/mods/pybsystick.h b/cc3200/misc/mpsystick.h similarity index 95% rename from cc3200/mods/pybsystick.h rename to cc3200/misc/mpsystick.h index abc61939b3..d7ad594613 100644 --- a/cc3200/mods/pybsystick.h +++ b/cc3200/misc/mpsystick.h @@ -25,6 +25,11 @@ * THE SOFTWARE. */ +#ifndef MPSYSTICK_H +#define MPSYSTICK_H + void sys_tick_wait_at_least(uint32_t stc, uint32_t delay_ms); bool sys_tick_has_passed(uint32_t stc, uint32_t delay_ms); uint32_t sys_tick_get_microseconds(void); + +#endif // MPSYSTICK_H