remove old tencentcloud_sdk and abandoned EVB boards

This commit is contained in:
daishengdong
2020-05-07 16:22:17 +08:00
parent b74cf8d598
commit 08e5f7b3ec
441 changed files with 648 additions and 266237 deletions

View File

@@ -19,7 +19,6 @@
#define _TOS_AT_H_
#include "tos_k.h"
#include "tos_at_utils.h"
#include "tos_hal.h"
#define AT_AGENT_ECHO_OK "OK"
@@ -114,7 +113,7 @@ typedef struct at_agent_st {
k_task_t parser;
at_cache_t recv_cache;
at_timer_t timer;
k_stopwatch_t timer;
k_mutex_t global_lock;

View File

@@ -1,40 +0,0 @@
/*----------------------------------------------------------------------------
* Tencent is pleased to support the open source community by making TencentOS
* available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* If you have downloaded a copy of the TencentOS binary from Tencent, please
* note that the TencentOS binary is licensed under the BSD 3-Clause License.
*
* If you have downloaded a copy of the TencentOS source code from Tencent,
* please note that TencentOS source code is licensed under the BSD 3-Clause
* License, except for the third-party components listed below which are
* subject to different license terms. Your integration of TencentOS into your
* own projects may require compliance with the BSD 3-Clause License, as well
* as the other licenses applicable to the third-party components included
* within TencentOS.
*---------------------------------------------------------------------------*/
#ifndef _TOS_AT_UTILS_H_
#define _TOS_AT_UTILS_H_
typedef struct at_timer_st {
k_tick_t end_time;
} at_timer_t;
void at_delay(k_tick_t tick);
void at_delay_ms(uint32_t millisec);
int at_timer_is_expired(at_timer_t *tmr);
void at_timer_countdown(at_timer_t *tmr, k_tick_t tick);
void at_timer_countdown_ms(at_timer_t *tmr, uint32_t millisec);
k_tick_t at_timer_remain(at_timer_t *tmr);
void at_timer_init(at_timer_t *tmr);
#endif

View File

@@ -41,7 +41,7 @@ __STATIC__ int at_uart_getchar(uint8_t *data, k_tick_t timeout)
{
k_err_t err;
at_delay(1);
tos_stopwatch_delay(1);
if (tos_sem_pend(&AT_AGENT->uart_rx_sem, timeout) != K_ERR_NONE) {
return -1;
@@ -622,9 +622,9 @@ __API__ int tos_at_channel_read_timed(int channel_id, uint8_t *buffer, size_t bu
tick = tos_millisec2tick(timeout);
at_timer_countdown(&AT_AGENT->timer, tick);
while (!at_timer_is_expired(&AT_AGENT->timer)) {
remain_tick = at_timer_remain(&AT_AGENT->timer);
tos_stopwatch_countdown(&AT_AGENT->timer, tick);
while (!tos_stopwatch_is_expired(&AT_AGENT->timer)) {
remain_tick = tos_stopwatch_remain(&AT_AGENT->timer);
if (remain_tick == (k_tick_t)0u) {
return total_read_len;
}
@@ -839,7 +839,7 @@ __API__ int tos_at_init(hal_uart_port_t uart_port, at_event_t *event_table, size
at_channel_init();
at_timer_init(&AT_AGENT->timer);
tos_stopwatch_create(&AT_AGENT->timer);
buffer = tos_mmheap_alloc(AT_UART_RX_FIFO_BUFFER_SIZE);
if (!buffer) {
@@ -948,6 +948,8 @@ __API__ void tos_at_deinit(void)
tos_chr_fifo_destroy(&AT_AGENT->uart_rx_fifo);
tos_stopwatch_destroy(&AT_AGENT->timer);
at_channel_deinit();
}

View File

@@ -1,96 +0,0 @@
/*----------------------------------------------------------------------------
* Tencent is pleased to support the open source community by making TencentOS
* available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* If you have downloaded a copy of the TencentOS binary from Tencent, please
* note that the TencentOS binary is licensed under the BSD 3-Clause License.
*
* If you have downloaded a copy of the TencentOS source code from Tencent,
* please note that TencentOS source code is licensed under the BSD 3-Clause
* License, except for the third-party components listed below which are
* subject to different license terms. Your integration of TencentOS into your
* own projects may require compliance with the BSD 3-Clause License, as well
* as the other licenses applicable to the third-party components included
* within TencentOS.
*---------------------------------------------------------------------------*/
#include "tos_k.h"
#include "tos_at.h"
void at_delay(k_tick_t tick)
{
k_tick_t now;
now = tos_systick_get();
while ((tos_systick_get() - now) < tick) {
;
}
}
void at_delay_ms(uint32_t millisec)
{
k_tick_t tick;
tick = tos_millisec2tick(millisec);
at_delay(tick);
}
int at_timer_is_expired(at_timer_t *tmr)
{
k_tick_t now;
if (!tmr) {
return -1;
}
now = tos_systick_get();
return now >= tmr->end_time;
}
void at_timer_countdown(at_timer_t *tmr, k_tick_t tick)
{
k_tick_t now;
if (!tmr) {
return;
}
now = tos_systick_get();
tmr->end_time = now + tick;
}
void at_timer_countdown_ms(at_timer_t *tmr, uint32_t millisec)
{
k_tick_t expire;
if (!tmr) {
return;
}
expire = tos_millisec2tick(millisec);
at_timer_countdown(tmr, expire);
}
k_tick_t at_timer_remain(at_timer_t *tmr)
{
k_tick_t now;
now = tos_systick_get();
if (at_timer_is_expired(tmr)) {
return (k_tick_t)0u;
}
return tmr->end_time - now;
}
void at_timer_init(at_timer_t *tmr)
{
if (!tmr) {
return;
}
tmr->end_time = 0;
}