Renesas APIs ***
一个线程,强行结束另外一个线程,并将其挂起:
static void SuspendTask(TX_THREAD *thread)
{
UINT status = ;
UINT state; status = tx_thread_terminate(thread);
if(status != TX_SUCCESS)
return ;
do
{
tx_thread_sleep();
status = tx_thread_info_get(thread, NULL, &state, NULL, NULL, NULL, NULL, NULL, NULL);
if (status != TX_SUCCESS)
{
xp_log("can not get clean thread status (0x%02x)\r\n", status);
break;
}
} while (!(state & (TX_COMPLETED | TX_TERMINATED)));
tx_thread_reset(thread);
}
启动
static void StartRawTask(void)
{
UINT status = ;
UINT state; status = tx_thread_info_get(&rawThread, NULL, &state, NULL, NULL, NULL, NULL, NULL, NULL);
if(status == TX_SUCCESS)
{
if(state == TX_SUSPENDED)
tx_thread_resume(&rawThread);
}
else
tx_thread_create(&rawThread, (CHAR *) "raw thread", RawThreadCallback, (ULONG)(&MaterialBoxTempT3), &raw_stack, COMMON_THREAD_STACK, , , , TX_AUTO_START);
}
nx_api.h
nx_ip_address_get
nx_packet_pool_create
nx_packet_pool_info_get
nx_tcp_socket_bytes_available
nx_tcp_socket_info_get
nx_tcp_socket_mss_get
系统重启
NVIC_SystemReset
static ULONG _get_time(void)
{
ULONG seconds, milliseconds;
UINT status; /* Get local time as set by SNTP client */
status = nx_sntp_client_get_local_time(&g_sntp_client, &seconds, &milliseconds, NX_NULL);
if (status != NX_SUCCESS)
return ; /* Convert to Unix epoch */
seconds -= UNIX_TO_NTP_EPOCH_SECS; return seconds;
}
TCP/UDP
nx_tcp_client_socket_bind
nx_tcp_server_socket_accept
nx_tcp_server_socket_listen
nx_tcp_socket_create
/* APIs for packet pool. */
/* APIs for packet pool. */
#define nx_packet_allocate _nxe_packet_allocate
#define nx_packet_copy _nxe_packet_copy
#define nx_packet_data_append _nxe_packet_data_append
#define nx_packet_data_extract_offset _nxe_packet_data_extract_offset
#define nx_packet_data_retrieve _nxe_packet_data_retrieve
#define nx_packet_length_get _nxe_packet_length_get
#define nx_packet_pool_create(p, n, l, m, s) _nxe_packet_pool_create(p, n, l, m, s, sizeof(NX_PACKET_POOL))
#define nx_packet_pool_delete _nxe_packet_pool_delete
#define nx_packet_pool_info_get _nxe_packet_pool_info_get
#define nx_packet_pool_low_watermark_set _nxe_packet_pool_low_watermark_set
#define nx_packet_release(p) _nxe_packet_release(&p)
#define nx_packet_transmit_release(p) _nxe_packet_transmit_release(&p)
Renesas APIs ***的更多相关文章
- (转载)构建public APIs与CORS
from: https://segmentfault.com/a/1190000000709909 理由:在操作层面详细的讲解了跨域的操作.尤其是对于option请求的详解.收藏. 在构建Public ...
- ECMAScript Web APIs node.js
https://hacks.mozilla.org/2015/04/es6-in-depth-an-introduction/ What falls under the scope of ECMASc ...
- 【墙内备份】Android 6.0 APIs
Android 6.0 APIs In this documentSHOW MORE Fingerprint Authentication Confirm Credential App Linking ...
- swagger:The World's Most Popular Framework for APIs.
swagger官网:http://swagger.io/ swagger ui demo:http://petstore.swagger.io 让API文档总是与API定义同步更新,是一件非常有价值的 ...
- [译]Node.js : Building RESTful APIs using Loopback and MySQL
国庆后可能就要使用StrongLoop那套东西来做项目了 原文:http://www.javabeat.net/loopback-mysql/ Loopback是什么? Loopback是一个开源的N ...
- URLRedirector 解决网页上无法访问 google CDN 的问题(fonts、ajax、themes、apis等)
URLRedirector 解决网页上无法访问 google CDN 的问题(fonts.ajax.themes.apis等) 由于某些原因,在访问国外的网站时有时候会特别慢,像 stackoverf ...
- 谷歌正式发布Google APIs Client Library for .NET
好消息,特大好消息! 英文原文:Google API library for .NET paves the way for Google services on Windows phone 本月 17 ...
- POSTMAN and HTTPie to test APIs
http://blog.mashape.com/postman-httpie-test-apis/ We love working with APIs at Mashape, and we love ...
- Android SDK Manager Google Apis 下载
本意是想利用google的gcm来实装android推送功能的,很遗憾, google貌似已经停止提供啥服务给国内了,或者说国内想继续使用google 服务暂时变得几乎不可能了.找了个代理来进行goo ...
随机推荐
- 【hive】子查询
hive中是不支持子查询的 但是并不意味这不支持in 或者 not in in 或者not in 后边是定值的话是支持的 但是接定制是可以的 例如 select id from table not i ...
- laravel中单独获取一个错误信息的方法
获取单独的错误信息的方法
- A网页高度随B内容而自然变化兼容各种浏览器
今天是星期一,昨天又没有睡好,眼睛干干的,还有点痛疼,于是不想干啥.但是心里又不觉得过意不去,浪费时间呀,考虑再三把自己前面实现的一个东西发了上来.算是今天的功劳,没有过多的文字描述,纯粹是贴图片和代 ...
- iTabs Tab切换插件
最近项目中使用到Tab切换,切换的页面不变,内容发生变化,随手写了份简单的插件,附带源码.先看样子: 本人也考虑到是否使用jquery ui tab,但是还是热衷于自己写一份,首先好处之一是易于培训, ...
- APUE学习笔记——6 系统数据文件与信息
1.用户口令:/etc/passwd文件 该文件中包含下列结构体信息.其中,当下主修熊passwd不再这里显示,是使用了一个占位符. struct passwd { char * pw_name; / ...
- PHP sessions that have already been started
In my PHP code, if a session has already started, and I try to start a new one, I get the following ...
- Node 抓取非utf-8编码页面
代码示例 Nodejs抓取非utf8字符编码的页面 -- Ruby's Louvre var http = require('http'); var iconv = require('iconv-li ...
- gdi+ 中发生一般性错误 wpf解决方法
错误背景:原来在winform程序中写了一个窗口,在wpf应用程序中调用显示了这个窗口,有个头像功能,加载本地的一个图片文件,加载前进行了各种逻辑判断,效果如下: 而加载的关键代码如下面: pictu ...
- Java之OO的特性与原则
OO(Object-Oriented)面向对象 面向对象,有三个特性.五个原则之说. 特性 封装 顾名思义,封装就好比一个黑盒子,内部被隐藏,只有几个接口与外界相连.具体来说,所谓封装 ...
- Git详解之十 Git常用命令
下面是我整理的常用 Git 命令清单.几个专用名词的译名如下. Workspace:工作区 Index / Stage:暂存区 Repository:仓库区(或本地仓库) Remote:远程仓库 一. ...