Skip to content

Commit b104bbc

Browse files
authored
Merge branch 'RT-Thread:master' into master
2 parents eb29bb5 + 054f6db commit b104bbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1502
-949
lines changed

.github/workflows/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ jobs:
131131
- {RTT_BSP: "at32/at32f407-start", RTT_TOOL_CHAIN: "sourcery-arm"}
132132
- {RTT_BSP: "smartfusion2", RTT_TOOL_CHAIN: "sourcery-arm"}
133133
- {RTT_BSP: "raspberry-pico", RTT_TOOL_CHAIN: "sourcery-arm"}
134+
- {RTT_BSP: "raspberry-pi/raspi4-32", RTT_TOOL_CHAIN: "sourcery-arm"}
134135
steps:
135136
- uses: actions/checkout@v2
136137
- name: Set up Python

bsp/efm32/drv_rtc.c

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -128,49 +128,6 @@ void rt_hw_rtc_isr(rt_device_t device)
128128
RTC->IFC = _RTC_IFC_MASK;
129129
}
130130

131-
/***************************************************************************//**
132-
* @brief
133-
* Register RTC device
134-
*
135-
* @details
136-
*
137-
* @note
138-
*
139-
* @param[in] device
140-
* Pointer to device descriptor
141-
*
142-
* @param[in] name
143-
* Device name
144-
*
145-
* @param[in] flag
146-
* Configuration flags
147-
*
148-
* @return
149-
* Error code
150-
******************************************************************************/
151-
rt_err_t rt_hw_rtc_register(
152-
rt_device_t device,
153-
const char *name,
154-
rt_uint32_t flag)
155-
{
156-
RT_ASSERT(device != RT_NULL);
157-
158-
device->type = RT_Device_Class_RTC;
159-
device->rx_indicate = RT_NULL;
160-
device->tx_complete = RT_NULL;
161-
device->init = RT_NULL;
162-
device->open = rt_rtc_open;
163-
device->close = RT_NULL;
164-
device->read = rt_rtc_read;
165-
device->write = RT_NULL;
166-
device->control = rt_rtc_control;
167-
device->user_data = RT_NULL; /* no private */
168-
169-
/* register a character device */
170-
return rt_device_register(device, name, RT_DEVICE_FLAG_RDWR | flag);
171-
}
172-
173-
174131
/***************************************************************************//**
175132
* @brief
176133
* Initialize all RTC module related hardware and register RTC device to kernel
@@ -224,7 +181,18 @@ void rt_hw_rtc_init(void)
224181
}
225182

226183
/* register rtc device */
227-
rt_hw_rtc_register(&rtc, RT_RTC_NAME, EFM32_NO_DATA);
184+
rtc.type = RT_Device_Class_RTC;
185+
rtc.rx_indicate = RT_NULL;
186+
rtc.tx_complete = RT_NULL;
187+
rtc.init = RT_NULL;
188+
rtc.open = rt_rtc_open;
189+
rtc.close = RT_NULL;
190+
rtc.read = rt_rtc_read;
191+
rtc.write = RT_NULL;
192+
rtc.control = rt_rtc_control;
193+
rtc.user_data = RT_NULL; /* no private */
194+
195+
rt_device_register(&rtc, RT_RTC_NAME, RT_DEVICE_FLAG_RDWR | EFM32_NO_DATA);
228196
}
229197

230198
#endif
Binary file not shown.

0 commit comments

Comments
 (0)