Remove rarely used rt_time_t

next_delay should be rt_tick_t

Use time_t for RT_DEVICE_CTRL_RTC_GET_TIME
This commit is contained in:
Yonggang Luo
2025-09-27 08:20:12 +08:00
committed by R b b666
parent d58958e397
commit 62bc4ba774
3 changed files with 3 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ static void key_io_init(void)
static void key_thread_entry(void *parameter)
{
#ifdef RT_USING_RTGUI
rt_time_t next_delay;
rt_tick_t next_delay;
rt_uint8_t i;
struct rtgui_event_kbd kbd_event;
@@ -106,7 +106,7 @@ static void key_thread_entry(void *parameter)
}
#else
extern struct rt_messagequeue mq;
rt_time_t next_delay;
rt_tick_t next_delay;
struct lcd_msg msg;
msg.type = KEY_MSG;

View File

@@ -88,7 +88,6 @@ typedef rt_ubase_t rt_uintptr_t; /**< Type for unsigned
#endif /* defined(RT_USING_LIBC) && !defined(RT_USING_NANO) */
typedef rt_base_t rt_err_t; /**< Type for error number */
typedef rt_uint32_t rt_time_t; /**< Type for time stamp */
typedef rt_uint32_t rt_tick_t; /**< Type for tick count */
typedef rt_base_t rt_flag_t; /**< Type for flags */
typedef rt_ubase_t rt_dev_t; /**< Type for device */

View File

@@ -136,7 +136,7 @@ static rt_err_t rtc_control(rt_device_t dev, int cmd, void *args)
case RT_DEVICE_CTRL_RTC_GET_TIME:
/* read device */
rt_hw_rtc_get(&tmp);
*((rt_time_t *)args) = timegm(&tmp);
*time = timegm(&tmp);
break;
case RT_DEVICE_CTRL_RTC_SET_TIME: