Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches

Overview

Automatic hardware selection logic.

Automatic Driver Selection

Resolves the low-level driver implementation based on ACTIVE_RTC_TYPE. This allows the user to switch RTC devices by changing a single configuration value in userDef.h.

Note
  • User can switch between supported RTC devices by changing the ACTIVE_RTC_TYPE macro.
    • Add #define ACTIVE_RTC_TYPE RTC_TYPE_PCF8523 in userDef.h to use PCF8523 RTC.
    • Add #define ACTIVE_RTC_TYPE RTC_TYPE_DS3231 in userDef.h to use DS3231 RTC.
  • For custom RTC devices, include the custom driver header and define RTC_CTRL and RTC_DRIVER macros accordingly.
    • Refer to userDef.h in rtcDemo of including a custom RTC driver.
#define RTC_CTRL   RTC_PCF8523_ADDR
 I2C Address for the currently selected RTC (PCF8523).
#define RTC_DRIVER   PCF8523_DRIVER
 Driver Interface Table for the currently selected RTC (PCF8523).

Macro Definition Documentation

◆ RTC_CTRL

#define RTC_CTRL   RTC_PCF8523_ADDR

#include <rtc_config.h>

I2C Address for the currently selected RTC (PCF8523).

Note
User can switch to different RTC device by changing ACTIVE_RTC_TYPE macro in userDef.h. RTC_CTRL used for Address of RTC controller *‍/

Definition at line 53 of file rtc_config.h.

◆ RTC_DRIVER

#define RTC_DRIVER   PCF8523_DRIVER

#include <rtc_config.h>

Driver Interface Table for the currently selected RTC (PCF8523).

Note
User can switch to different RTC device by changing ACTIVE_RTC_TYPE macro in userDef.h. RTC_DRIVER used for Driver API Table of RTC controller *‍/

Definition at line 58 of file rtc_config.h.