Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
不穿格子衫的农民
TencentOS Tiny
提交
3fc92b3c
T
TencentOS Tiny
项目概览
不穿格子衫的农民
/
TencentOS Tiny
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TencentOS Tiny
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3fc92b3c
编写于
4月 13, 2021
作者:
M
mculover666
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove the uart_rx_lock in AT framework,update tos version to 2.2.1
上级
8bc0b761
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
63 addition
and
19 deletion
+63
-19
board/TencentOS_tiny_EVB_MX_Plus/KEIL/mqttclient/TencentOS_tiny.uvoptx
...OS_tiny_EVB_MX_Plus/KEIL/mqttclient/TencentOS_tiny.uvoptx
+1
-1
board/TencentOS_tiny_EVB_MX_Plus/KEIL/tcp_through_module/TencentOS_tiny.uvoptx
...EVB_MX_Plus/KEIL/tcp_through_module/TencentOS_tiny.uvoptx
+14
-2
board/TencentOS_tiny_EVB_MX_Plus/KEIL/tcp_through_module/TencentOS_tiny.uvprojx
...VB_MX_Plus/KEIL/tcp_through_module/TencentOS_tiny.uvprojx
+6
-1
examples/tcp_through_module/tcp_through_module.c
examples/tcp_through_module/tcp_through_module.c
+7
-0
kernel/core/include/tos_version.h
kernel/core/include/tos_version.h
+2
-2
net/at/include/tos_at.h
net/at/include/tos_at.h
+1
-1
net/at/src/tos_at.c
net/at/src/tos_at.c
+32
-12
未找到文件。
board/TencentOS_tiny_EVB_MX_Plus/KEIL/mqttclient/TencentOS_tiny.uvoptx
浏览文件 @
3fc92b3c
...
...
@@ -410,7 +410,7 @@
<Group>
<GroupName>
examples
</GroupName>
<tvExp>
1
</tvExp>
<tvExp>
0
</tvExp>
<tvExpOptDlg>
0
</tvExpOptDlg>
<cbSel>
0
</cbSel>
<RteFlg>
0
</RteFlg>
...
...
board/TencentOS_tiny_EVB_MX_Plus/KEIL/tcp_through_module/TencentOS_tiny.uvoptx
浏览文件 @
3fc92b3c
...
...
@@ -1254,6 +1254,18 @@
<RteFlg>
0
</RteFlg>
<bShared>
0
</bShared>
</File>
<File>
<GroupNumber>
12
</GroupNumber>
<FileNumber>
77
</FileNumber>
<FileType>
1
</FileType>
<tvExp>
0
</tvExp>
<tvExpOptDlg>
0
</tvExpOptDlg>
<bDave2>
0
</bDave2>
<PathWithFileName>
..\..\..\..\devices\ec600s\ec600s.c
</PathWithFileName>
<FilenameWithoutPath>
ec600s.c
</FilenameWithoutPath>
<RteFlg>
0
</RteFlg>
<bShared>
0
</bShared>
</File>
</Group>
<Group>
...
...
@@ -1264,7 +1276,7 @@
<RteFlg>
0
</RteFlg>
<File>
<GroupNumber>
13
</GroupNumber>
<FileNumber>
7
7
</FileNumber>
<FileNumber>
7
8
</FileNumber>
<FileType>
1
</FileType>
<tvExp>
0
</tvExp>
<tvExpOptDlg>
0
</tvExpOptDlg>
...
...
@@ -1284,7 +1296,7 @@
<RteFlg>
0
</RteFlg>
<File>
<GroupNumber>
14
</GroupNumber>
<FileNumber>
7
8
</FileNumber>
<FileNumber>
7
9
</FileNumber>
<FileType>
1
</FileType>
<tvExp>
0
</tvExp>
<tvExpOptDlg>
0
</tvExpOptDlg>
...
...
board/TencentOS_tiny_EVB_MX_Plus/KEIL/tcp_through_module/TencentOS_tiny.uvprojx
浏览文件 @
3fc92b3c
...
...
@@ -339,7 +339,7 @@
<MiscControls></MiscControls>
<Define>
USE_HAL_DRIVER,STM32L431xx,WITH_TOS_NET_ADAPTER
</Define>
<Undefine></Undefine>
<IncludePath>
..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32L4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\kernel\core\include;..\..\TOS-CONFIG;..\..\..\..\platform\arch\arm\cortex-m4\keil;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\BSP\Hardware\DHT11;..\..\BSP\Hardware\OLED;..\..\BSP\Hardware\BH1750;..\..\..\..\devices\esp8266;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include;..\..\..\..\net\sal_module_wrapper;..\..\..\..\devices\ec20;..\..\..\..\devices\ec200s;..\..\..\..\devices\air724;..\..\..\..\devices\l610
</IncludePath>
<IncludePath>
..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32L4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\kernel\core\include;..\..\TOS-CONFIG;..\..\..\..\platform\arch\arm\cortex-m4\keil;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\BSP\Hardware\DHT11;..\..\BSP\Hardware\OLED;..\..\BSP\Hardware\BH1750;..\..\..\..\devices\esp8266;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include;..\..\..\..\net\sal_module_wrapper;..\..\..\..\devices\ec20;..\..\..\..\devices\ec200s;..\..\..\..\devices\air724;..\..\..\..\devices\l610
;..\..\..\..\devices\ec600s
</IncludePath>
</VariousControls>
</Cads>
<Aads>
...
...
@@ -818,6 +818,11 @@
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\devices\l610\l610.c
</FilePath>
</File>
<File>
<FileName>
ec600s.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\devices\ec600s\ec600s.c
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
examples/tcp_through_module/tcp_through_module.c
浏览文件 @
3fc92b3c
...
...
@@ -9,6 +9,7 @@
//#define USE_EC200S
//#define USE_AIR724
//#define USE_L610
//#define USE_EC600S
#ifdef USE_ESP8266
#include "esp8266.h"
...
...
@@ -38,6 +39,10 @@
#include "l610.h"
#endif
#ifdef USE_EC600S
#include "ec600s.h"
#endif
#define TCP_TEST_TASK0_STK_SIZE 4096
void
tcp_test0
(
void
);
osThreadDef
(
tcp_test0
,
osPriorityNormal
,
1
,
TCP_TEST_TASK0_STK_SIZE
);
...
...
@@ -114,6 +119,8 @@ void application_entry(void *arg)
air724_sal_init
(
HAL_UART_PORT_0
);
#elif defined(USE_L610)
l610_sal_init
(
HAL_UART_PORT_0
);
#elif defined(USE_EC600S)
ec600s_sal_init
(
HAL_UART_PORT_0
);
#endif
socket_id_0
=
tos_sal_module_connect
(
"117.50.111.72"
,
"8080"
,
TOS_SAL_PROTO_TCP
);
...
...
kernel/core/include/tos_version.h
浏览文件 @
3fc92b3c
...
...
@@ -25,8 +25,8 @@
#define TOS_VERSION_MAJOR 0x02
#define TOS_VERSION_MINOR 0x02
#define TOS_VERSION_PATCH 0x0
0
#define TOS_VERSION "2.2.
0
"
#define TOS_VERSION_PATCH 0x0
1
#define TOS_VERSION "2.2.
1
"
#endif
/* _TOS_VERSION_H_ */
net/at/include/tos_at.h
浏览文件 @
3fc92b3c
...
...
@@ -122,7 +122,7 @@ typedef struct at_agent_st {
hal_uart_t
uart
;
k_mutex_t
uart_tx_lock
;
k_mutex_t
uart_rx_lock
;
//
k_mutex_t uart_rx_lock;
k_sem_t
uart_rx_sem
;
k_chr_fifo_t
uart_rx_fifo
;
uint8_t
*
uart_rx_fifo_buffer
;
...
...
net/at/src/tos_at.c
浏览文件 @
3fc92b3c
...
...
@@ -14,6 +14,15 @@
* as the other licenses applicable to the third-party components included
* within TencentOS.
*---------------------------------------------------------------------------*/
/*
Note:
If you find that the AT framework occasionally loses characters,
this may be caused by the unnecessary critical section of at_channel,
so you can remove the critical section of ring_queue in tos_ring_queue.c.
Once you remove, ring queue becomes only a data structure,
you must use critical section or mutex to protect the data in ring_queue.
*/
#include "tos_at.h"
...
...
@@ -39,6 +48,7 @@ __API__ int tos_at_global_lock_post(void)
__STATIC__
int
at_uart_getchar
(
uint8_t
*
data
,
k_tick_t
timeout
)
{
TOS_CPU_CPSR_ALLOC
();
k_err_t
err
;
tos_stopwatch_delay
(
1
);
...
...
@@ -46,14 +56,24 @@ __STATIC__ int at_uart_getchar(uint8_t *data, k_tick_t timeout)
if
(
tos_sem_pend
(
&
AT_AGENT
->
uart_rx_sem
,
timeout
)
!=
K_ERR_NONE
)
{
return
-
1
;
}
if
(
tos_mutex_pend
(
&
AT_AGENT
->
uart_rx_lock
)
!=
K_ERR_NONE
)
{
return
-
1
;
}
/*
the uart_rx_fifo is only read by at_parser task,
and it will be written in usart interrupt handler,
so it is more effective to use critical sections.
*/
// if (tos_mutex_pend(&AT_AGENT->uart_rx_lock) != K_ERR_NONE) {
// return -1;
// }
TOS_CPU_INT_DISABLE
();
err
=
tos_chr_fifo_pop
(
&
AT_AGENT
->
uart_rx_fifo
,
data
);
TOS_CPU_INT_ENABLE
();
tos_mutex_post
(
&
AT_AGENT
->
uart_rx_lock
);
//
tos_mutex_post(&AT_AGENT->uart_rx_lock);
return
err
==
K_ERR_NONE
?
0
:
-
1
;
}
...
...
@@ -469,11 +489,11 @@ __API__ int tos_at_cmd_exec(at_echo_t *echo, uint32_t timeout, const char *cmd,
int
ret
=
0
;
va_list
args
;
if
(
tos_sem_create
(
&
echo
->
__status_set_notify
,
0
)
!=
K_ERR_NONE
)
{
if
(
!
echo
)
{
return
-
1
;
}
if
(
!
echo
)
{
if
(
tos_sem_create
(
&
echo
->
__status_set_notify
,
0
)
!=
K_ERR_NONE
)
{
return
-
1
;
}
...
...
@@ -883,9 +903,9 @@ __API__ int tos_at_init(hal_uart_port_t uart_port, at_event_t *event_table, size
goto
errout3
;
}
if
(
tos_mutex_create
(
&
AT_AGENT
->
uart_rx_lock
)
!=
K_ERR_NONE
)
{
goto
errout4
;
}
//
if (tos_mutex_create(&AT_AGENT->uart_rx_lock) != K_ERR_NONE) {
//
goto errout4;
//
}
if
(
tos_mutex_create
(
&
AT_AGENT
->
uart_tx_lock
)
!=
K_ERR_NONE
)
{
goto
errout5
;
...
...
@@ -917,9 +937,9 @@ errout6:
tos_mutex_destroy
(
&
AT_AGENT
->
uart_tx_lock
);
errout5:
tos_mutex_destroy
(
&
AT_AGENT
->
uart_rx_lock
);
//
tos_mutex_destroy(&AT_AGENT->uart_rx_lock);
errout4:
//
errout4:
tos_sem_destroy
(
&
AT_AGENT
->
uart_rx_sem
);
errout3:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录