mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-25 00:37:18 +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)
|
static void key_thread_entry(void *parameter)
|
||||||
{
|
{
|
||||||
#ifdef RT_USING_RTGUI
|
#ifdef RT_USING_RTGUI
|
||||||
rt_time_t next_delay;
|
rt_tick_t next_delay;
|
||||||
rt_uint8_t i;
|
rt_uint8_t i;
|
||||||
|
|
||||||
struct rtgui_event_kbd kbd_event;
|
struct rtgui_event_kbd kbd_event;
|
||||||
@@ -106,7 +106,7 @@ static void key_thread_entry(void *parameter)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
extern struct rt_messagequeue mq;
|
extern struct rt_messagequeue mq;
|
||||||
rt_time_t next_delay;
|
rt_tick_t next_delay;
|
||||||
struct lcd_msg msg;
|
struct lcd_msg msg;
|
||||||
msg.type = KEY_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) */
|
#endif /* defined(RT_USING_LIBC) && !defined(RT_USING_NANO) */
|
||||||
|
|
||||||
typedef rt_base_t rt_err_t; /**< Type for error number */
|
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_uint32_t rt_tick_t; /**< Type for tick count */
|
||||||
typedef rt_base_t rt_flag_t; /**< Type for flags */
|
typedef rt_base_t rt_flag_t; /**< Type for flags */
|
||||||
typedef rt_ubase_t rt_dev_t; /**< Type for device */
|
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:
|
case RT_DEVICE_CTRL_RTC_GET_TIME:
|
||||||
/* read device */
|
/* read device */
|
||||||
rt_hw_rtc_get(&tmp);
|
rt_hw_rtc_get(&tmp);
|
||||||
*((rt_time_t *)args) = timegm(&tmp);
|
*time = timegm(&tmp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RT_DEVICE_CTRL_RTC_SET_TIME:
|
case RT_DEVICE_CTRL_RTC_SET_TIME:
|
||||||
|
|||||||
Reference in New Issue
Block a user