嵌入式实时时钟与日历管理器(rtc-calendar-manager)

#一人分享一个skill#
name: rtc-calendar-manager
description: 生成嵌入式实时时钟(RTC)配置和日历管理代码,支持时间同步、闹钟和低功耗唤醒

type: code-generation
parameters:
  - name: rtc_type
    type: string
    required: true
    description: RTC类型(硬件RTC、软件RTC、外部RTC模块DS3231/PCF8563)
  - name: target_mcu
    type: string
    required: true
    description: 单片机型号(STM32L4、ESP32、MSP430、NRF52840)
  - name: time_sync
    type: string
    description: 时间同步方式(NTP、GPS、RTC广播、BLE时间同步)
  - name: alarm_config
    type: array
    description: 闹钟配置(日期、时间、重复周期、唤醒源)
  - name: low_power_mode
    type: boolean
    default: true
    description: 是否启用RTC低功耗唤醒功能
核心功能:
RTC 初始化和时间设置代码
日历功能实现(年 / 月 / 日 / 时 / 分 / 秒 / 星期计算)
闹钟和周期性中断配置
时间同步协议实现(如 SNTP 客户端)
低功耗模式下的 RTC 唤醒配置
时间戳生成和日志记录
闰年和夏令时自动处理
RTC 故障检测和恢复机制
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务