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 ...
随机推荐
- nginx的编译,和简单的配置问题
反向代理常见的lvs.haproxy. 缓存服务常见的.squid.vanish.常见的前端缓存.Apache是多进程的web服务器,Nginx是多线程的web服务器. Nginx的特点,对静态能力强 ...
- 【LeetCode 231_整数_位运算】Power of Two
bool isPowerOfTwo(int n) { && !(n & (n - )); }
- 基于Vue的后台选择推荐
引言: Vue.js目前是业界大名鼎鼎的Web解决方案,具体有点,我这里就不再赘述了,感兴趣的童鞋自行查找阅读,这里罗列一下,这几天自己研究的成果,管理后台. 管理后台 Vue Element Adm ...
- online learning,batch learning&批量梯度下降,随机梯度下降
以上几个概念之前没有完全弄清其含义及区别,容易混淆概念,在本文浅析一下: 一.online learning vs batch learning online learning强调的是学习是实时的,流 ...
- iOS的坑:ERRORITMS-90096: "Your binary is not optimized for iPhone 5 - New iPhone appsand app updatesXcode7提交到App Store二进制文件时报错错误:“你itms-90096二进制不是iPhone 5的新iPhone应用程序和应用程序的更新必须提交支持iPhone 5英寸的显示器........
在工程里的Images.xcassets添加并设置LaunchImage对解决ERROR ITMS-90096根本不会起到任何作用,需要单独添加针对iPhone 5的载入图片.关键点有三项: 1.图片 ...
- 金三银四跳槽季,Java面试题大纲
跳槽时时刻刻都在发生,但是我建议大家跳槽之前,先想清楚为什么要跳槽.切不可跟风,看到同事一个个都走了,自己也盲目的开始面试起来(期间也没有准备充分),到底是因为技术原因(影响自己的发展,偏移自己规划的 ...
- iOS RUN LOOP 是个什么东西?
RUN Loop是什么? 1.runloop是事件接收和分发机制的一个实现. 2.什么时候使用runloop 当需要和该线程进行交互的时候.主线程默认有runloop.当自己启动一个线程,如果只是 ...
- js之验证码倒计时功能
<!DOCTYPE html> <html > <head> <meta http-equiv="Content-Type" conten ...
- vim简单的文本编辑命令
<blockquote>:e! enter</blockquote>消除所有这次编辑的,回到原来文件的样子.不过此文件还是打开状态.<blockquote>:q! ...
- Linux 中断处理
HardIRQ 和 softirq : http://www.it165.net/os/html/201211/3766.html 博文:http://blog.csdn.net/yin262/art ...