Skip to content

Commit e0c7503

Browse files
committed
[components][at] 修复合并导致的错误
1 parent a0cccbd commit e0c7503

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

components/drivers/include/drivers/dev_serial_v2.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,18 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event);
355355

356356
rt_err_t rt_hw_serial_control_isr(struct rt_serial_device *serial, int cmd, void *args);
357357

358+
/**
359+
* @brief Register a serial device to device list
360+
*
361+
* @param serial serial device
362+
* @param name device name
363+
* @param flag device flag
364+
* @param data device private data
365+
* @return rt_err_t error code
366+
* @note This function will register a serial device to system device list,
367+
* and add a device object to system object list.
368+
* @ingroup group_Serial_v2
369+
*/
358370
rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
359371
const char *name,
360372
rt_uint32_t flag,

components/net/at/src/at_client.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,7 @@ static int at_client_para_init(at_client_t client)
987987
(void (*)(void *parameter))client_parser,
988988
client,
989989
1024 + 512,
990-
6,
991-
/* RT_THREAD_PRIORITY_MAX / 3 - 1,*/
990+
RT_THREAD_PRIORITY_MAX / 3 - 1,
992991
5);
993992
if (client->parser == RT_NULL)
994993
{
@@ -1088,18 +1087,13 @@ int at_client_init(const char *dev_name, rt_size_t recv_bufsz, rt_size_t send_bu
10881087
RT_ASSERT(client->device->type == RT_Device_Class_Char);
10891088
#if (!defined(RT_USING_SERIAL_V2))
10901089
rt_device_set_rx_indicate(client->device, at_client_rx_ind);
1091-
1092-
#ifdef RT_USING_SERIAL_V2
1093-
open_result = rt_device_open(client->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_RX_NON_BLOCKING);
1094-
#else
10951090
/* using DMA mode first */
10961091
open_result = rt_device_open(client->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_DMA_RX);
10971092
/* using interrupt mode when DMA mode not supported */
10981093
if (open_result == -RT_EIO)
10991094
{
11001095
open_result = rt_device_open(client->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX);
11011096
}
1102-
#endif /* RT_USING_SERIAL_V2 */
11031097
RT_ASSERT(open_result == RT_EOK);
11041098
#else
11051099
open_result = rt_device_open(client->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_RX_BLOCKING | RT_DEVICE_FLAG_TX_BLOCKING);

components/net/at/src/at_server.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,18 +591,13 @@ int at_server_init(void)
591591
RT_ASSERT(at_server_local->device->type == RT_Device_Class_Char);
592592
#if (!defined(RT_USING_SERIAL_V2))
593593
rt_device_set_rx_indicate(at_server_local->device, at_rx_ind);
594-
595-
#ifdef RT_USING_SERIAL_V2
596-
open_result = rt_device_open(client->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_RX_NON_BLOCKING);
597-
#else
598594
/* using DMA mode first */
599595
open_result = rt_device_open(at_server_local->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_DMA_RX);
600596
/* using interrupt mode when DMA mode not supported */
601597
if (open_result == -RT_EIO)
602598
{
603599
open_result = rt_device_open(at_server_local->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX);
604600
}
605-
#endif /* RT_USING_SERIAL_V2 */
606601
RT_ASSERT(open_result == RT_EOK);
607602
#else
608603
open_result = rt_device_open(at_server_local->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_RX_BLOCKING | RT_DEVICE_FLAG_TX_BLOCKING);

0 commit comments

Comments
 (0)