Skip to content

Commit

Permalink
port/wch: Change modutime -> modtime
Browse files Browse the repository at this point in the history
  • Loading branch information
alphonse82 committed Jun 12, 2023
1 parent f154ac5 commit e323771
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ports/wch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SRC_C = \
shared/runtime/gchelper_generic.c \
shared/runtime/pyexec.c \
shared/runtime/stdout_helpers.c \
extmod/modutime.c
extmod/modtime.c

SRC_C += $(wildcard $(SRC_DIR)*.c)

Expand All @@ -53,7 +53,7 @@ SRC_S += bsp/startup_ch32v30x_D8C.S
SRC_C += $(SRC_MOD)
SRC_CXX += $(SRC_MOD_CXX)
SRC_QSTR += $(SRC_MOD) $(SRC_MOD_CXX)
SRC_QSTR += pin.c pin_named_pins.c modmachine.c modutime.c
SRC_QSTR += pin.c pin_named_pins.c modmachine.c modtime.c
SRC_QSTR += shared/readline/readline.c shared/runtime/pyexec.c

SRC_C += $(BUILD)/pins_$(BOARD).c
Expand Down
6 changes: 3 additions & 3 deletions ports/wch/modutime.c → ports/wch/modtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* The MIT License (MIT)
*
* Copyright (c) 2013, 2014 Damien P. George
* Copyright (c) 2013-2023 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,7 +28,7 @@
#include "shared/timeutils/timeutils.h"

// Return the localtime as an 8-tuple.
STATIC mp_obj_t mp_utime_localtime_get(void) {
STATIC mp_obj_t mp_time_localtime_get(void) {
// get current date and time
// note: need to call get time then get date to correctly access the registers
rtc_init_finalise();
Expand All @@ -50,7 +50,7 @@ STATIC mp_obj_t mp_utime_localtime_get(void) {
}

// Returns the number of seconds, as an integer, since 1/1/2000.
STATIC mp_obj_t mp_utime_time_get(void) {
STATIC mp_obj_t mp_time_time_get(void) {
// get date and time
// note: need to call get time then get date to correctly access the registers
rtc_init_finalise();
Expand Down
4 changes: 3 additions & 1 deletion ports/wch/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
#define MICROPY_PY_STRUCT (1)

#define MICROPY_PY_MODTIME (1)
#define MICROPY_PY_UTIME_MP_HAL (1)
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/wch/modutime.c"

#define MICROPY_PY_MODMACHINE (1)

Expand Down

0 comments on commit e323771

Please sign in to comment.