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

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

?? sos_timer.h

?? 嵌入式操作系統內核
?? H
字號:
/** * @brief    header file for timer * @author   Simon Han * @brief    Pre-allocated safe timer blocks * @author   Ram Kumar *//** * @note Modules can pre-allocate timers by specifying the num_timers field * in the module header. There is an upper limit on the maximum number of  * timers that can be pre-allocated by a module. The limit is defined in the * timer_conf.h file in the /processor directory. */#ifndef _TIMER0_H#define _TIMER0_H#include <hardware_types.h>#include <pid.h>#include <sos_list.h>#include <timer_conf.h>#include <sos_module_types.h>#include <message_types.h>enum   {    TIMER_REPEAT        = 0, //!< high priority, periodic      TIMER_ONE_SHOT      = 1, //!< high priority, one shot    SLOW_TIMER_REPEAT   = 2, //!< low priority, periodic    SLOW_TIMER_ONE_SHOT = 3, //!< low priority, one shot  };#define SLOW_TIMER_MASK                  0x02#define ONE_SHOT_TIMER_MASK              0x01enum  {    TIMER_PRE_ALLOCATED = 0x02, //! Indicate Timer Block is Pre-allocated    };/** * @brief Flag helpers */#define flag_timer_pre_allocated(tt)   ((tt->flag) & TIMER_PRE_ALLOCATED)/** * \brief Payload of the Timer Timeout Message */// Ram - Mirror the MsgParam structure with a more descriptive field nametypedef struct {  uint8_t tid;  //!< Timer TID  uint16_t pad; } PACK_STRUCTsos_timeout_t;/** * \struct sos_timer_t * \brief Kernel data structure for the timer (size is 16 bytes)  */typedef struct {  list_t    list;          //!< list   uint8_t   type;          //!< timer type  sos_pid_t pid;           //!< module id of the timer requester  uint8_t   tid;           //!< timer instance id  int32_t   ticks;         //!< clock ticks for a repeat timer  int32_t   delta;         //!< current delta value   uint8_t   flag;          //!< Timer block status flags} sos_timer_t;/** * Get timer tid from Message */static inline uint8_t timer_get_tid( Message *msg ){	MsgParam* params = (MsgParam*)(msg->data);	return params->byte;}/** * Application timer API */#ifndef _MODULE_#include <sos_types.h>	/** * @brief Initialize a timer block.  * @param pid Module Identity * @param tid Timer Instance Id, only needs to be unique to the module * @param type Type can be {TIMER_REPEAT, TIMER_ONE_SHOT, SLOW_TIMER_REPEAT, SLOW_TIMER_ONE_SHOT * @return SOS_OK if a timer block is pre-allocated or already initialized or dynamically allocated * @return -ENOMEM if the system is unable to dynamically allocate memory * @return -EEXIST if the same timer is already running */extern int8_t ker_timer_init(sos_pid_t pid, uint8_t tid, uint8_t type);/** * @brief Start a new timer * @param pid module id * @param tid timer instance id, only need to be unique in the module * @param interval binary interval * @return SOS_OK if a timer was already initialized * @return -EINVAL if a timer is already running or it is not initialized * @return -EPERM if the timer interval is less than 5 * @note binary interval uses following conversion * 1024 ticks == 1000 milliseconds *  512 ticks ==  500 milliseconds *  256 ticks ==  250 milliseconds *  128 ticks ==  125 milliseconds * * The interval cannot be less than 5 */extern int8_t ker_timer_start(sos_pid_t pid, uint8_t tid, int32_t interval);/** * @brief Restart a timer * @param pid Modue Id * @param tid Timer instance id * @param interval Binary Interval * @return SOS_OK upon success * @return -EINVAL if the timer is neither running nor initialized * @return -EPERM if the timer interval is less than 5 * @note Refer to the ker_timer_start API for discussion on the interval * ker_timer_restart will: * 1. Either stop a running timer and restart it with the new interval * 2. Start an initialized timer * It will return an error if a timer is not initialized. */extern int8_t ker_timer_restart(sos_pid_t pid, uint8_t tid, int32_t interval);/** * @brief Stop a timer * @param pid module id * @param tid timer instance id to be stopped * @return SOS_OK upon success * @return -EINVAL if the timer is not running * @note This call will only stop the timer and it will NOT de-allocate its resources. * Use the ker_timer_release to deep free timer memory when a timer is no longer needed. */extern int8_t ker_timer_stop(sos_pid_t pid, uint8_t tid);/** * @brief Deep free of a running or initialized timer * @param pid Module Id * @param tid Timer instance ID to be released * @return SOS_OK Upon success * @return -EINVAL If no such timer exists * @note This call does not free UNINITIALIZED PRE-ALLOCATED timers */extern int8_t ker_timer_release(sos_pid_t pid, uint8_t tid);//------------------------------------------------------------------------// KERNEL ACCESSIBLE FUNCTIONS//------------------------------------------------------------------------/** * @brief Init function */extern void timer_init(void);/** * @brief Initialize a permanent timer for the kernel.  * @note * 1. The space for the timer is statically allocated. * 2. This API is accessible only to the statically compiled modules. * 3. It is used for reducing the memory consumption. */extern int8_t ker_permanent_timer_init(sos_timer_t* tt, sos_pid_t pid, uint8_t tid, uint8_t type);/** * @brief Remove timers of a particular pid */extern int8_t timer_remove_all(sos_pid_t pid);/** * @brief Pre allocate requested timers at module load time */extern int8_t timer_preallocate(sos_pid_t pid, uint8_t num_timers);/** * @brief Micro-reboot the timer service for the given module */#ifdef FAULT_TOLERANT_SOSextern int8_t timer_micro_reboot(sos_module_t *handle);#endif/* ************************************************* * Real Time Timer Support for kernel drivers * *************************************************//** * function callback for real time clock * the callback is called in the hardware interrupt.   * Therefore, if there are any data sharing in this callback and other  * functions, one has to use CRITICAL_SECTION macro to protect racing  * condition. */typedef void (*timer_callback_t)(void);/** * Start a realtime timer * * @param uint16_t value initial value of timer ticks * @param uint16_t interval reload value of time ticks * @param timer_callback_t f timer callback function * * timer_realtime_start starts a timer with value in 1/1024 seconds.   * When value amount of time is passed, f is called.   * If interval is not zero, timer is reloaded with interval. */int8_t timer_realtime_start(uint16_t value, uint16_t interval, timer_callback_t f);/** * Stop a realtime timer with callback */ int8_t timer_realtime_stop(timer_callback_t f);#endif /* _MODULE_ */#endif /* _TIMER0_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕av一区二区三区| 国模冰冰炮一区二区| 国产欧美日韩精品一区| 欧美一级一区二区| 日韩视频中午一区| 欧美一区二区三区婷婷月色| 欧美综合欧美视频| 91在线小视频| 不卡av在线网| 成人性生交大合| 国产成人自拍网| 国产精品一区二区不卡| 国产精品影音先锋| 国产在线播放一区| 亚洲综合一区二区精品导航| 午夜精品久久久久影视| 五月天亚洲婷婷| 黄色成人免费在线| 国产一区二区视频在线播放| 精品无人码麻豆乱码1区2区| 久久福利资源站| 国产一区二区在线影院| 激情六月婷婷久久| 国产盗摄一区二区| 成人激情动漫在线观看| 99re在线视频这里只有精品| 91免费视频观看| 欧美性色欧美a在线播放| 在线视频你懂得一区| 欧美伊人久久久久久久久影院| 91精彩视频在线观看| 成人在线综合网| 99久久精品费精品国产一区二区| 国产高清久久久| www.欧美日韩| 欧美日韩国产美| 日韩三级视频中文字幕| 精品国产一区a| 国产精品乱码一区二三区小蝌蚪| 成人欧美一区二区三区1314| 亚洲女女做受ⅹxx高潮| 亚洲成年人影院| 久久69国产一区二区蜜臀| 粉嫩一区二区三区性色av| 一本大道av一区二区在线播放| 日本精品免费观看高清观看| 日韩一级视频免费观看在线| 1024成人网| 精品一区二区国语对白| 成人蜜臀av电影| 在线成人高清不卡| 国产欧美一区二区精品仙草咪| 亚洲中国最大av网站| 婷婷中文字幕综合| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 久久久亚洲高清| 国产三区在线成人av| 一区二区三区国产精华| 久久精品国产一区二区| 在线观看亚洲精品| 久久影院视频免费| 丝袜美腿亚洲综合| 成人国产亚洲欧美成人综合网| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 夜夜夜精品看看| 午夜久久久久久久久| 极品美女销魂一区二区三区免费| 国产美女主播视频一区| 91久久精品日日躁夜夜躁欧美| 欧美亚洲一区二区在线观看| 精品盗摄一区二区三区| 一区二区三区波多野结衣在线观看| 国产精品伊人色| 欧美视频在线一区二区三区 | 国产老肥熟一区二区三区| 欧美精三区欧美精三区| 伊人夜夜躁av伊人久久| 成人美女视频在线观看18| 久久综合久久综合九色| 日日骚欧美日韩| 欧美日韩一区视频| 亚洲综合自拍偷拍| 欧美日韩一区二区在线观看| 国产精品国产三级国产普通话蜜臀| 紧缚捆绑精品一区二区| 日韩一区二区麻豆国产| 香蕉乱码成人久久天堂爱免费| 色综合久久久久| 亚洲欧美日韩国产成人精品影院 | 精品美女在线播放| 热久久久久久久| 欧美日韩中字一区| 亚洲国产精品精华液网站| 在线观看91视频| 亚洲成人免费电影| 欧美三电影在线| 日韩av不卡在线观看| 97se亚洲国产综合在线| 国产亚洲精品超碰| 国产不卡视频在线播放| 欧美不卡一区二区三区四区| 亚洲大片精品永久免费| 欧美午夜精品久久久久久超碰| ...xxx性欧美| 91在线porny国产在线看| 国产精品人人做人人爽人人添| 国产suv精品一区二区三区| 国产女人水真多18毛片18精品视频| 国产98色在线|日韩| 欧美成人a在线| 粉嫩久久99精品久久久久久夜| 亚洲图片欧美激情| 欧美三片在线视频观看| 久久福利视频一区二区| 欧美激情综合五月色丁香小说| 91网址在线看| 日本不卡一区二区三区高清视频| 精品盗摄一区二区三区| 麻豆国产精品一区二区三区 | 久久国产精品第一页| 国产免费成人在线视频| 欧洲精品一区二区三区在线观看| 久久99久久精品| 亚洲永久精品大片| 久久久久九九视频| 91精彩视频在线| 在线免费观看日本欧美| 日产欧产美韩系列久久99| 欧美区一区二区三区| 国产mv日韩mv欧美| 亚洲一区二三区| 久久精品视频网| 欧美精品tushy高清| 国产精品自拍一区| 午夜精品久久久久久不卡8050| 91精品国产欧美一区二区成人| 精品在线观看免费| 亚洲久本草在线中文字幕| 精品国产乱子伦一区| 欧美在线一区二区| 99麻豆久久久国产精品免费| 亚洲一区二区不卡免费| 久久青草欧美一区二区三区| 在线播放一区二区三区| 成人激情电影免费在线观看| 久久99精品久久久久婷婷| 亚洲一区二区在线免费观看视频| 久久香蕉国产线看观看99| 欧美伊人久久久久久久久影院| 懂色av一区二区在线播放| 蜜臀精品一区二区三区在线观看| 国产女主播在线一区二区| 精品av久久707| 欧美精品一级二级| 在线观看一区日韩| 97久久久精品综合88久久| 亚洲bt欧美bt精品777| 日韩免费一区二区三区在线播放| 欧美福利视频一区| 欧美三级视频在线播放| 色综合夜色一区| av电影在线观看不卡| 国产黄色91视频| 国产一区中文字幕| 国内欧美视频一区二区| 亚洲人一二三区| 自拍偷拍亚洲欧美日韩| 国产婷婷一区二区| 自拍偷拍欧美精品| 国产精品福利一区二区三区| 亚洲麻豆国产自偷在线| 亚洲三级在线免费| 午夜精品久久久久久久久| 午夜免费欧美电影| 日日夜夜免费精品视频| 免费国产亚洲视频| 日日夜夜免费精品| 亚洲va在线va天堂| 日韩电影在线一区| 乱一区二区av| 精品一区免费av| 黄页视频在线91| 成人免费av网站| 日本韩国精品在线| 欧美日韩精品是欧美日韩精品| 欧美日韩一区二区三区高清| 91在线无精精品入口| 制服丝袜日韩国产| 欧美电视剧在线看免费| 国产亚洲欧洲一区高清在线观看| 国产日韩欧美激情| 综合欧美一区二区三区| 粗大黑人巨茎大战欧美成人| 在线视频欧美精品| 日韩三级在线观看| 一区二区三区蜜桃网| 精品一区二区三区视频在线观看| 色综合夜色一区| 欧美电影免费观看高清完整版在线观看 | 国产精品99久久久久久久vr|