File tree Expand file tree Collapse file tree 2 files changed +22
-9
lines changed
include/zephyr/drivers/rtc Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 15
15
#include <zephyr/devicetree.h>
16
16
#include <zephyr/drivers/rtc.h>
17
17
#include <zephyr/sys/sys_io.h>
18
+ #include <zephyr/drivers/rtc/mc146818.h>
18
19
19
20
#define RTC_STD_INDEX (DT_INST_REG_ADDR_BY_IDX(0, 0))
20
21
#define RTC_STD_TARGET (DT_INST_REG_ADDR_BY_IDX(0, 1))
118
119
#define RTC_IN_CLK_DIV_BITS_1048576 (1 << 4)
119
120
#define RTC_IN_CLK_DIV_BITS_32768 (2 << 4)
120
121
121
- struct rtc_mc146818_data {
122
- struct k_spinlock lock ;
123
- bool alarm_pending ;
124
- rtc_alarm_callback cb ;
125
- void * cb_data ;
126
- rtc_update_callback update_cb ;
127
- void * update_cb_data ;
128
- };
129
-
130
122
static uint8_t rtc_read (int reg )
131
123
{
132
124
uint8_t value ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2025 Intel Corporation.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #ifndef ZEPHYR_INCLUDE_DRIVERS_RTC_MC146818_H_
8
+ #define ZEPHYR_INCLUDE_DRIVERS_RTC_MC146818_H_
9
+
10
+ #include <zephyr/drivers/rtc.h>
11
+
12
+ struct rtc_mc146818_data {
13
+ struct k_spinlock lock ;
14
+ bool alarm_pending ;
15
+ rtc_alarm_callback cb ;
16
+ void * cb_data ;
17
+ rtc_update_callback update_cb ;
18
+ void * update_cb_data ;
19
+ };
20
+
21
+ #endif /* ZEPHYR_INCLUDE_DRIVERS_RTC_MC146818_H_ */
You can’t perform that action at this time.
0 commit comments