File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,12 @@ It is possible to use it thanks all alarm API with an extra argument:
153153 rtc.enableAlarm(rtc.MATCH_DHHMMSS, STM32RTC::ALARM_B);
154154```
155155
156+ ### Since STM32RTC version higher than 1.3.7
157+ _ Get the RTC handle_
158+
159+ * ** ` RTC_HandleTypeDef *RTC_GetHandle(void) ` **
160+
161+
156162Refer to the Arduino RTC documentation for the other functions
157163http://arduino.cc/en/Reference/RTC
158164
Original file line number Diff line number Diff line change @@ -132,6 +132,12 @@ class STM32RTC {
132132
133133 void end (void );
134134
135+ // Could be used to mix Arduino API and STM32Cube HAL API (ex: DMA). Use at your own risk.
136+ RTC_HandleTypeDef *getHandle (void )
137+ {
138+ return RTC_GetHandle ();
139+ }
140+
135141 Source_Clock getClockSource (void );
136142 void setClockSource (Source_Clock source, uint32_t predivA = (PREDIVA_MAX + 1 ), uint32_t predivS = (PREDIVS_MAX + 1 ));
137143 void getPrediv (uint32_t *predivA, uint32_t *predivS);
Original file line number Diff line number Diff line change @@ -98,6 +98,15 @@ static inline int _log2(int x)
9898
9999/* Exported functions --------------------------------------------------------*/
100100
101+ /**
102+ * @brief Get pointer to RTC_HandleTypeDef
103+ * @param None
104+ * @retval pointer to RTC_HandleTypeDef
105+ */
106+ RTC_HandleTypeDef * RTC_GetHandle (void ) {
107+ return & RtcHandle ;
108+ }
109+
101110/**
102111 * @brief Set RTC clock source
103112 * @param source: RTC clock source: LSE, LSI or HSE
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ typedef void(*voidCallbackPtr)(void *);
173173
174174/* Exported macro ------------------------------------------------------------*/
175175/* Exported functions ------------------------------------------------------- */
176+ RTC_HandleTypeDef * RTC_GetHandle (void );
176177void RTC_SetClockSource (sourceClock_t source );
177178void RTC_getPrediv (uint32_t * asynch , uint32_t * synch );
178179void RTC_setPrediv (uint32_t asynch , uint32_t synch );
You can’t perform that action at this time.
0 commit comments