xiaoxiang781216 commented on code in PR #21541:
URL: https://github.com/apache/nuttx/pull/21541#discussion_r4509724017


##########
boards/xtensa/esp32/esp32-m5-stickc-plus/src/esp32_bm8563.c:
##########
@@ -0,0 +1,98 @@
+/****************************************************************************
+ * boards/xtensa/esp32/esp32-m5-stickc-plus/src/esp32_bm8563.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <errno.h>
+#include <syslog.h>
+
+#include <nuttx/arch.h>
+#include <nuttx/clock.h>
+#include <nuttx/i2c/i2c_master.h>
+#include <nuttx/timers/pcf8563.h>
+
+#include "esp32_i2c.h"
+#include "esp32-m5-stickc-plus.h"
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_rtc_initialize
+ *
+ * Description:
+ *   clock_initialize() always calls up_rtc_initialize() when CONFIG_RTC is
+ *   set.  On ESP32 that function only exists in the internal RTC driver,
+ *   which is not built when the system time comes from the external BM8563
+ *   instead.  There is no internal RTC hardware to set up in that case; the
+ *   BM8563 itself is brought up later from board_bm8563_initialize(), once
+ *   the I2C bus is available.
+ *
+ ****************************************************************************/
+
+#ifndef CONFIG_RTC_DRIVER
+int up_rtc_initialize(void)

Review Comment:
   yes, but you can enable CONFIG_RTC_EXTERNAL to skip the early 
up_rtc_initialize



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to