Skip to content

Commit 3bc7723

Browse files
committed
fix assert on 4.1.1
1 parent a90d0ff commit 3bc7723

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

samples/rti_uart_sample.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ void rti_uart_sample(void)
115115
{
116116
struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT;
117117

118+
rt_sem_init(&rx_sem, "rti_sem", 0, RT_IPC_FLAG_FIFO);
119+
118120
rti_dev = rt_console_get_device();
119121

120122
#ifdef RT_USING_FINSH

src/rti.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void rti_isr_enter(void);
6565
static void rti_isr_exit(void);
6666
static void rti_isr_to_scheduler(void);
6767
static void rti_enter_timer(rt_uint32_t timer);
68-
static void rti_exit_timer(rt_uint32_t timer);
68+
static void rti_exit_timer(void);
6969
static void rti_thread_start_exec(rt_uint32_t thread);
7070
static void rti_thread_stop_exec(void);
7171
static void rti_thread_start_ready(rt_uint32_t thread);
@@ -104,6 +104,10 @@ static void rti_object_put(rt_object_t object);
104104
static int rti_init(void);
105105
static rt_size_t rti_data_put(const rt_uint8_t *ptr, rt_uint16_t length);
106106

107+
#ifndef __on_rti_data_new_data_notify
108+
#define __on_rti_data_new_data_notify() __ON_HOOK_ARGS(rti_data_new_data_notify, ())
109+
#endif
110+
107111
/* rti hook functions */
108112
static void rti_timer_enter(rt_timer_t t)
109113
{
@@ -116,7 +120,7 @@ static void rti_timer_exit(rt_timer_t t)
116120
{
117121
if (!rti_status.enable || rti_status.disable_nest[RTI_TIMER_NUM])
118122
return ;
119-
rti_exit_timer((rt_uint32_t)t);
123+
rti_exit_timer();
120124
}
121125

122126
static void rti_thread_inited(rt_thread_t thread)
@@ -424,7 +428,7 @@ static void rti_enter_timer(rt_uint32_t timer)
424428
rti_send_packet_value(RTI_ID_TIMER_ENTER, rti_shrink_id(timer));
425429
}
426430

427-
static void rti_exit_timer(rt_uint32_t timer)
431+
static void rti_exit_timer(void)
428432
{
429433
rti_send_packet_void(RTI_ID_TIMER_EXIT);
430434
}

0 commit comments

Comments
 (0)