亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sys_module_in.h

?? 嵌入式操作系統內核
?? H
字號:
#ifndef __SYS_MODULE_H__#define __SYS_MODULE_H__#ifndef _MODULE_#include <sos.h>#endif#include <sos_info.h>#include <sos_types.h>#include <sos_module_types.h>#include <sos_timer.h>#include <pid.h>#include <stddef.h>#include <kertable_conf.h>  // for get_kertable_entry()#include <sos_error_types.h>/** * * Allocate memory * * \param size Number of bytes to allocate * * \return Pointer to memory  * * \note * A call to sys_malloc will either return a valid pointer or, upon failure, * cause the system to enter a ``panic'' mode.  The default panic mode * suspends all node operations and sends a panic message out via: LEDs, * radio, and UART. * * Remember to either store, free, or SOS_RELEASE any dynamically allocated * memory.  Leaky motes sink boats!  Or is that lips... * */void* ker_sys_malloc(uint16_t size);/** *  * Reallocate dynamic memory *  * \param ptr Pointer to the currently held block of memory * * \param newSize Number of bytes to be allocated * * \return Pointer to the reallocated memory. * * This function is a slightly optimized way to extend the size of a buffer. * If it can, the function will simply extend the current block of memory so * that no data needs to be copied and return the ptr passed in.  If that * fails the kernel w ill attempt to allocate a fresh larger buffer, copy the * data over, and return a pointer to this new buffer.  If neither of these * two succeed, the function returns NULL, but you still have access to ptr. * * \note Returns a NULL if unable to reallocate but the original pointer is * still valid. * */void* ker_sys_realloc(void *ptr, uint16_t newSize);/** * * Free memory * * \param ptr Pointer to the data that should be freed * */void ker_sys_free(void *ptr);/** * * Claim the data payload of a message * * \param msg Pointer to message structure carrying data to claim  * * \return Pointer to memory * * This function allows you to claim the data in an in coming message.  This * is often called from the message handler function of a module.  Module * writers can treat this function in a manner very similar to the * sys_malloc() function. * * \n If a module does not call this function, the msg->data field may be * released by the kernel or another module after the current function ends. * This can make for very difficult to track bugs. * * \n The lower level behavior of this function is based upon if the * ::SOS_MSG_RELEASE flag was set by the call to post(), or one if its * variations, that generated the message. * * \li If ::SOS_MSG_RELEASE was set then this function takes control of the * data released into the data payload of the message * * \li If ::SOS_MSG_RELEASE was NOT set then this function attempts to * allocate a new buffer of the same size and create a deep copy of the data * payload * * \note A call to sys_msg_take_data will either return a valid pointer or, * upon failure, cause the system to enter a ``panic'' mode.  The default * panic mode suspends all node operations and sends a panic message out via: * LEDs, radio, and UART. * */void* ker_sys_msg_take_data(Message *msg);/** * Start a timer *  * \param tid Timer ID. This ID has to be defined by the caller. *  * \param interval The timeout interval specified in ticks of duration (1/1024) sec. * * \param type Timer type - Periodic or One Shot (Defined in sos_timer.h) *  * \return SOS_OK upon success, else -EINVAL * * \warning Starting a timer without initializing it will result  * in a failure with error code -EINVAL. *  */int8_t ker_sys_timer_start(uint8_t tid, int32_t interval, uint8_t type);/** * Restart a timer * * \param tid Timer ID. This ID has to be defined by the caller. *  * \param interval The timeout interval specified in ticks of duration (1/1024) sec. *  * * \return SOS_OK upon success, else -EINVAL * * \warning Re-starting a timer without initializing it will result  * in a failure with error code -EINVAL. * * \note *  *  * \li A running timer is stopped and re-started with the new parameters. *  * \li If the timer is not running, it is started. *  */int8_t ker_sys_timer_restart(uint8_t tid, int32_t interval) ;/** * Stop a running timer * * \param tid Timer ID. This ID has to be defined by the caller. * * \return SOS_OK on success, else -EINVAL * * \warning Stopping a timer that is not running or that is  * not initialized  will result in a failure with error code -EINVAL. * */int8_t ker_sys_timer_stop(uint8_t tid) ;/** Post a message with payload to a module * * \param dst_mod_id ID of the destination module * * \param type Unique message identifier. Kernel message types are defined in * message_types.h * * \param size Size of the payload (in bytes) that is being dispatched as a * part of the message * * \param *data Pointer to the payload buffer that is dispatched in the * message. * * \param flag Control scheduler priority, memory management properties of * payload.  Check message_types.h * * \return SOS_OK on success, -ENOMEM on failure * * \warning MESSAGE PAYLOAD SHOULD NEVER BE ALLOCATED FROM THE STACK. * * \note Important information about message flags *  * * \li ::SOS_MSG_RELEASE flag should be set if the source module wishes to * transfer ownership of the message payload to the destination module. * * \li ::SOS_MSG_RELIABLE flag is set if the source module wishes to receive * notification regarding the success/failure of message delivery to the * destination module.  The notification message has the type * ::MSG_PKT_SENDDONE and its payload contains the original message. The flag * field of the notification message has the value ::SOS_MSG_SEND_FAIL if the * message was not successfully delivered. The flag field is set to 0 upon * successful delivery. * * \li ::SOS_MSG_HIGH_PRIORITY flag is set to insert the message in a high * priority queue.  The high priority queue is serviced before the low * priority queue. * */int8_t ker_sys_post(sos_pid_t dst_mod_id, uint8_t type,		uint8_t size, void *data, uint16_t flag);/** * Post message with paylaod over different network link. * * \warning This is the implementation of sys_post_net, sys_post_uart, and  * sys_post_i2c.  Do not use this directly as the implementation might change */int8_t ker_sys_post_link(sos_pid_t dst_mod_id, uint8_t type,		uint8_t size, void *data, uint16_t flag, uint16_t dst_node_addr);/** Post a message with payload over network * * \param dst_mod_id ID of the destination module * * \param type Unique message identifier. Kernel message types are defined in * message_types.h * * \param size Size of the payload (in bytes) that is being dispatched as a * part of the message * * \param *data Pointer to the payload buffer that is dispatched in the * message. * * \param flag Control scheduler priority, memory management properties of * payload.  Check message_types.h * * \param dst_node_addr Destination node address *  * \return SOS_OK on success, -ENOMEM on failure * * Other than directing the message the radio, this message is the same as * sys_post * */#define sys_post_net(dst_mod_id, type, size, data, flag, dst_node_addr)   sys_post_link((dst_mod_id), (type), (size), (data), ((flag) | SOS_MSG_RADIO_IO), (dst_node_addr))/** Post a message with payload over UART  * * \param dst_mod_id ID of the destination module * * \param type Unique message identifier. Kernel message types are defined in * message_types.h * * \param size Size of the payload (in bytes) that is being dispatched as a * part of the message * * \param *data Pointer to the payload buffer that is dispatched in the * message. * * \param flag Control scheduler priority, memory management properties of * payload.  Check message_types.h * * \param dst_node_addr Destination node address * * \return SOS_OK on success, -ENOMEM on failure * * Other than directing the message the UART, this message is the same as * sys_post * */#define sys_post_uart(dst_mod_id, type, size, data, flag, dst_node_addr)   sys_post_link((dst_mod_id), (type), (size), (data), ((flag) | SOS_MSG_UART_IO), (dst_node_addr))/** Post a message with payload over I2C  * * \param dst_mod_id ID of the destination module * * \param type Unique message identifier. Kernel message types are defined in * message_types.h * * \param size Size of the payload (in bytes) that is being dispatched as a * part of the message * * \param *data Pointer to the payload buffer that is dispatched in the * message. * * \param flag Control scheduler priority, memory management properties of * payload.  Check message_types.h * * \param dst_node_addr Destination node address * * \return SOS_OK on success, -ENOMEM on failure * * Other than directing the message the the I2C, this message is the same as * sys_post * */#define sys_post_i2c(dst_mod_id, type, size, data, flag, dst_node_addr)   sys_post_link((dst_mod_id), (type), (size), (data), ((flag) | SOS_MSG_I2C_IO), (dst_node_addr))/** Post up to 4 bytes by value * * \param dst_mod_id ID of the destination module * * \param type Unique message identifier. Kernel message types are defined in * message_types.h * * \param data Data to send directly in the message * * \param flag Control scheduler priority, memory management properties of * payload.  Check message_types.h * * \return SOS_OK on success, -ENOMEM on failure * * \note This call is used to dispatch messages which have a very small * payloads by value.  Single values can be passed directily (with a type * cast).  Multiple small values can be passed, but the end user must pack and * unpack this data by hand. * */int8_t ker_sys_post_value(sos_pid_t dst_mod_id,  		uint8_t type, uint32_t data, uint16_t flag);/** * Node hardware type *  * \return ID of hardware type * * Returns an ID describing the hardware type of the node.  Common hardware * types include: *  *  * \li Mica2 -> 1 *  * \li MicaZ -> 2 *  * \li Tmote -> 6 *  *  * The detailed listing of hardware types is available in sos_info.h * */uint16_t sys_hw_type(void);/** *  * Node ID * * \return ID of the node * * Returns the node's ID.  This ID, much like an IP address, is the identifier * for the node in the network.  A node's ID is set at compile time by * specifying: *  * \verbatim make mica2 install ADDRESS=<node_address> \endverbatim * * when building the image for the node.  The address is explicitly set in the * binary loaded onto the node using $(ROOTDIR)/tools/utils/set-mote-id * utility. * */uint16_t sys_id(void);/** * * Random number * * \return Pseudo-random number * * Very simple random number generator. * */uint16_t sys_rand(void);/** * * Get CPU "time" * * \return Current CPU clock value * */uint32_t sys_time32(void);#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久久久 | 91精品国产乱码| 黄色精品一二区| 午夜久久久影院| 日韩国产欧美在线视频| 亚洲国产成人91porn| 亚洲成av人影院在线观看网| 亚洲mv在线观看| 日本色综合中文字幕| 麻豆视频一区二区| 黄一区二区三区| 国产一区二区不卡| 大白屁股一区二区视频| 99久久久精品| 欧美日韩成人激情| 日韩免费一区二区三区在线播放| 欧美mv日韩mv国产网站| 国产欧美久久久精品影院| 国产精品灌醉下药二区| 亚洲一区二区五区| 蜜臀va亚洲va欧美va天堂| 国产乱人伦偷精品视频不卡 | 乱中年女人伦av一区二区| 久久国产视频网| 成人免费看的视频| 欧美日韩一区二区不卡| 欧美成人艳星乳罩| 亚洲欧洲日韩在线| 日本美女一区二区三区视频| 国产精品一二三| 欧美影视一区在线| 欧美精品一区二区三区视频| 亚洲视频一二三| 蜜臀av性久久久久av蜜臀妖精| 春色校园综合激情亚洲| 欧美人成免费网站| 国产精品无遮挡| 日韩在线a电影| 97精品国产露脸对白| 日韩一区二区精品葵司在线| 自拍偷拍国产亚洲| 国内精品伊人久久久久av影院| 色婷婷综合激情| 久久久久久久久久久久久夜| 亚洲国产日韩a在线播放性色| 国产成人综合在线| 91麻豆精品国产自产在线| 中文字幕一区免费在线观看| 久久成人麻豆午夜电影| 欧美亚洲一区三区| 中文字幕在线观看一区二区| 久久不见久久见免费视频7 | 视频在线观看91| 99精品视频中文字幕| 久久午夜羞羞影院免费观看| 视频一区二区欧美| 欧美在线免费观看亚洲| 国产精品高潮呻吟| 国产乱码精品一区二区三区av| 欧美一区二区三区小说| 亚洲一区在线观看免费| 91婷婷韩国欧美一区二区| 国产日韩三级在线| 精品一区二区免费视频| 欧美一级黄色片| 亚洲成人一二三| 欧美性猛交一区二区三区精品| 亚洲天堂福利av| 99精品视频一区| 国产精品久久久久影院亚瑟| 国产99精品国产| 久久精品人人爽人人爽| 国产乱人伦偷精品视频不卡| 久久久高清一区二区三区| 激情六月婷婷综合| 久久精品一区蜜桃臀影院| 国产乱码精品一品二品| 国产日韩欧美一区二区三区综合| 国产一区二区三区免费播放| 亚洲精品在线电影| 国产成人精品三级麻豆| 国产精品乱人伦一区二区| 成人av午夜电影| 亚洲人成网站影音先锋播放| 在线观看亚洲专区| 视频一区二区三区在线| 精品日韩在线观看| 国产精品亚洲综合一区在线观看| 日本一区二区视频在线观看| 91视频精品在这里| 亚洲国产精品尤物yw在线观看| 91精品蜜臀在线一区尤物| 久久99精品视频| 欧美国产禁国产网站cc| 色婷婷激情综合| 日本成人在线看| 国产视频一区不卡| 在线亚洲一区二区| 日本不卡不码高清免费观看| 久久精品视频一区| 91国内精品野花午夜精品| 日本美女一区二区三区| 国产精品视频yy9299一区| 色婷婷亚洲精品| 国产一区二区三区精品视频| 最新日韩在线视频| 欧美一区二区在线观看| 成人综合在线观看| 亚洲va在线va天堂| 国产日韩精品久久久| 欧美日韩亚洲综合一区二区三区| 黄色精品一二区| 一区二区三区国产豹纹内裤在线| 91精品国产综合久久福利软件| 国内成+人亚洲+欧美+综合在线| 亚洲青青青在线视频| 欧美mv日韩mv国产网站app| 一本大道av一区二区在线播放| 裸体歌舞表演一区二区| 一区二区三区四区不卡视频| 久久精品一区二区三区不卡牛牛| 色欧美乱欧美15图片| 国产精品12区| 青青草原综合久久大伊人精品优势| 亚洲欧美综合另类在线卡通| 日韩欧美国产一区二区在线播放 | 亚洲综合999| 国产婷婷一区二区| 91精品国产品国语在线不卡| 色婷婷亚洲精品| av激情成人网| 国产成人免费在线| 九九在线精品视频| 日韩在线播放一区二区| 亚洲一级电影视频| 亚洲人成影院在线观看| 欧美精彩视频一区二区三区| 欧美成人国产一区二区| 欧美一区二区女人| 欧美日产在线观看| 精品1区2区3区| 色老综合老女人久久久| 91香蕉国产在线观看软件| 成人午夜伦理影院| 粉嫩aⅴ一区二区三区四区| 久久精品国产一区二区三区免费看| 亚洲成a人v欧美综合天堂下载| 一区二区三区四区亚洲| 亚洲精品乱码久久久久久日本蜜臀| 国产精品美女视频| 欧美国产国产综合| 国产精品入口麻豆原神| 国产欧美一区在线| 国产欧美精品一区二区三区四区| 久久久久久亚洲综合影院红桃| 欧美成人一区二区三区片免费 | 国产午夜精品理论片a级大结局| 日韩一级免费一区| 欧美电影精品一区二区| 精品卡一卡二卡三卡四在线| 欧美成人午夜电影| 久久久国产精品不卡| 国产精品免费视频观看| 亚洲日本欧美天堂| 亚洲线精品一区二区三区八戒| 午夜电影久久久| 老司机免费视频一区二区三区| 国内精品伊人久久久久av影院| 国产福利精品一区| 91丨porny丨国产| 欧美美女网站色| 日韩情涩欧美日韩视频| 久久精品视频在线免费观看| 亚洲欧美综合网| 视频一区欧美精品| 国产精品一级在线| 在线免费观看一区| 日韩一区二区三区电影在线观看| xfplay精品久久| 亚洲视频电影在线| 丝瓜av网站精品一区二区| 黄色成人免费在线| 色综合中文字幕国产 | 91久久人澡人人添人人爽欧美| 欧美日韩精品一区二区天天拍小说| 91精品久久久久久久久99蜜臂| 欧美激情综合在线| 日韩中文字幕一区二区三区| 福利一区福利二区| 欧美日韩二区三区| 中文字幕精品综合| 亚洲h精品动漫在线观看| 国产成人高清在线| 欧美高清性hdvideosex| 国产网红主播福利一区二区| 日韩精品欧美成人高清一区二区| 国产aⅴ综合色| 日韩精品专区在线| 亚洲主播在线观看| 成人免费视频播放|