mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-11-16 04:24:33 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user