Skip to content

Commit

Permalink
fix:[SERIAL_V2]Compilation error for version 5.0.2 or later
Browse files Browse the repository at this point in the history
  • Loading branch information
wdfk-prog authored and supperthomas committed Oct 27, 2024
1 parent ab73a0a commit 507864a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions adapter/drv_rtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,18 @@ static int _rtt_getc(struct rt_serial_device *serial)
return SEGGER_RTT_GetKey();
}
#ifdef RT_USING_SERIAL_V2
///< RT-Thread Kernel version
#if defined(RT_VERSION_CHECK) && (RTTHREAD_VERSION >= RT_VERSION_CHECK(5, 0, 2))
static rt_ssize_t mcu_transmit(struct rt_serial_device *serial,
rt_uint8_t *buf,
rt_size_t size,
rt_uint32_t tx_flag)
#else /* legacy version macros (<5.0.2) */
static rt_size_t mcu_transmit(struct rt_serial_device *serial,
rt_uint8_t *buf,
rt_size_t size,
rt_uint32_t tx_flag)
#endif
{
RT_ASSERT(serial != RT_NULL);
RT_ASSERT(buf != RT_NULL);
Expand Down

0 comments on commit 507864a

Please sign in to comment.