欧美vvv,亚洲第一成人在线,亚洲成人欧美日韩在线观看,日本猛少妇猛色XXXXX猛叫

新聞資訊

    - 編碼標準

    FreeRTOS源文件(對所有端口通用,但對端口層不通用)符合MISRA編碼標準指南。使用pc-lint和鏈接lint配置文件檢查遵從性。由于標準有很多頁長,并且可以從MISRA處以非常低的費用購買,所以我們在這里沒有復制所有的規則。
    就是下面這幾個文件。在文章末尾處我會粘貼處源代碼。


    下面列出和MISRA標準的差別:

    • 兩個API函數有多個出口點。由于臨界效率的原因,在這兩種情況下允許有偏差。
    • 在創建任務時,源代碼操作內存地址來定位分配給創建的任務的堆棧的起始地址和結束地址。代碼必須適用于FreeRTOS移植到的所有體系結構——包括具有8、16、20、24和32位總線的體系結構。這不可避免地需要一些指針運算。當使用指針算術時,將以編程方式檢查算術結果的正確性。
    • 在默認情況下,跟蹤宏是空的,因此它們不生成任何代碼。因此,MISRA符合性檢查是使用虛擬宏定義執行的。
    • MISRA 規則在認為適當的情況下逐行關閉(也就是說,如果認為對深度嵌入的系統來說,遵守規則的代碼比謹慎地不遵守規則創建的代碼更不合適)。每次這樣的事件都伴隨著使用特殊的pc-lint MISRA注釋標記語法的解釋。
    • FreeRTOS 支持多種不同的編譯器構建,其中有部分編譯器比其他編譯器更高級。出于這個原因,FreeRTOS 不使用由 C99 標準引入 C 語言的任何功能或語法。唯一的例外是使用stdint.h頭文件。FreeRTOS/Source/include目錄包含一個名為 stdint.readme 的文件,可以重命名為stdint.h,以提供構建 FreeRTOS 所需的最小stdint類型定義,如果你的編譯器不支持自定義,可以使用這個文件來代替。

    測試

    代碼的測試執行和移植分別在 FreeRTOS/Source 和FreeRTOS/Source/portable這兩個文件夾下。具體的可以參考1-FreeRTOS入門指南文章。

    通用代碼

    標準演示/測試文件試圖提供“分支”測試覆蓋,測試確保通過每個決策的“真”和“假”路徑都被執行。(在大多數情況下,這實際上實現了“條件”覆蓋,因為內核的編碼風格故意保持條件簡單,特別為了這個目的。)如果'else'路徑為空,則使用GCOV在每個'if()'條件的'else'路徑中定義一個NOP(無操作)指令的mtCOVERAGE_TEST_MARKER()宏來測量'分支'覆蓋率。mtCOVERAGE_TEST_MARKER()僅在度量測試時定義。

    傳輸層

    傳輸層代碼使用“reg test”任務進行測試,對于支持中斷嵌套的端口,使用“中斷隊列”任務進行測試。
    “reg test”中創建多個(通常是兩個)任務,這些任務首先用已知值填充所有CPU寄存器,然后連續檢查每個寄存器是否保持其預期的已知值,因為其他測試連續執行(浸泡測試)。每個 reg 測試任務都使用唯一的值。
    “中斷隊列”任務對嵌套至少三個深度的不同優先級的中斷執行測試。宏用于在代碼中的相關點插入人為的延遲,以確保實現所需的測試覆蓋率。

    內存安全證明

    FreeRTOS Core(和FreeRTOS for AWS IoT)庫包括內存安全證明。同樣的證明被應用于 FreeRTOS 內核和 FreeRTOS-Plus-TCP 堆棧,但這兩個較舊的庫還沒有完全覆蓋。

    命名規則

    RTOS 內核和演示應用程序源代碼使用以下規則定義:

    變量:

    • 類型為 uint32_t的變量以ul 為前綴,其中“u”表示“無符號”,“l”表示“long”。
    • 類型為 uint16_t的變量以us 為前綴,其中“u”表示“無符號”,“s”表示“short”。
    • 類型為 uint8_t的變量以uc 為前綴,其中“u”表示“無符號”,“c”表示“char”。
    • 非標準類型的變量以x 為前綴。示例包括 BaseType_t 和
      TickType_t,它們是可移植的層定義類型定義,分別用于體系結構的自然或最有效的類型,以及用于保存 RTOS 時鐘周期計數的類型。
    • 非標準類型的變量以x 為前綴。示例包括 BaseType_t 和
      TickType_t,它們是可移植的層定義類型定義,分別用于體系結構的自然或最有效的類型,以及用于保存 RTOS 時鐘周期計數的類型。
    • 指針有一個附加的前綴p,例如,一個指向uint16_t的指針會有前綴pus。
    • 根據 MISRA 指南,不合格的標準字符類型只允許包含 ASCII字符,并以c 為前綴。
    • 根據 MISRA 指南,char * 類型的變量只允許保存指向 ASCII 字符串的指針,并且前綴為pc。

    功能

    • 文件范圍靜態(私有)函數以prv 為前綴。
    • API 函數以其返回類型為前綴,按照為變量定義的約定,添加前綴v表示void。API 函數名稱以定義它們的文件的名稱開頭。例如,vTaskDelete 在 tasks.c 中定義,并且具有 void 返回類型。

    宏定義

    • 宏的定義是以他們的文件為前綴,前綴小寫。比如:configUSE_PREEMPTION
      這個定義是在配置文件FreeRTOSConfig.h 中定義。
    • 除前綴外,宏全部以大寫形式書寫,并使用下劃線分隔。

    數據類型

    僅用stdint.h和RTOS自己定義的typedef,但是下列情況除外:

    • char
      與MISRA指南一致,不合格的字符類型是允許的,但只有當它們用于保存ASCII字符時才允許。
    • char *
      與MISRA指南一致,允許非限定字符指針,但只有當它們用于指向ASCII字符串時才允許。這消除了在使用期望使用char *形參的標準庫函數時抑制良性編譯器警告的需要,特別是考慮到一些編譯器默認不合格的char類型是有符號的,而另一些編譯器默認不合格的char類型是無符號的。

    RTOS為每個端口定義了四種類型。如下:

    • TickType_t
      如果configUSE_16_BIT_TICKS設置為非零 (true),則TickType_t定義為無符號 16 位類型。如果configUSE_16_BIT_TICKS設置為零 (false),則TickType_t定義為無符號 32 位類型。有關完整信息,請參閱 API 文檔的自定義部分。(這點會在后面的章節進行介紹)
      32位架構應該始終將configUSE_16_BIT_TICKS設置為0。
    • BaseType_t
      這被定義為體系結構中最有效、最基礎的類型。例如,在32位體系結構上,basettype_t將被定義為32位類型。在16位體系結構上,basettype_t將被定義為16位類型。如果basettype_t被定義為char類型,則必須特別注意確保函數返回值使用有符號字符,這些函數返回值可能為負值,表示錯誤。
    • UBaseType_t
      這是定義一個無符號basettype_t。
    • StackType_t
      定義為存儲在堆棧上的項的體系結構使用的類型。通常,這將是16位體系結構上的16位類型和32位體系結構上的32位類型,盡管有一些例外。由FreeRTOS內部使用。

    RTOS風格參考指南

    • 縮進
      四個空格字符用于縮進。
    • 注釋
      注釋不能超過80行,除非它們跟隨并描述一個參數。
      C++風格的雙斜杠(//)是不使用的。
    • 布局
      FreeRTOS 源代碼布局旨在盡可能易于查看和閱讀,下面給出一些代碼片段的文件內容格式。
    /* C庫頭文件放在首行... */
    #include <stdlib.h>
    /* ...其次是RTOS頭文件... */
    #include "FreeRTOS.h"
    /* ...再次是其他的頭文件. */
    #include "HardwareSpecifics.h"
    /* 接下來是宏定義,最好用括號括起來 */
    #define A_DEFINITION ( 1 )
    /*
    * 接下來是靜態(文件私有)函數原型,帶有注釋
    * 在這種樣式中,每一行都以“*”開頭。.
    */
    static void prvAFunction( uint32_t ulParameter );
    /* 文件作用域變量是函數定義之前的最后一個變量。變量的注釋采用這種樣式(沒有每一行以一個“*”). */
    static BaseType_t xMyVariable;
    /*以下分隔符用于每個函數的右括號后,在開始下一個函數定義之前,在它后面有一個空行。 */
    /*-----------------------------------------------------------*/
    void vAFunction( void )
    {
    /* 函數定義在這里—注意結束符后的分隔符花括號。 */
    }
    /*-----------------------------------------------------------*/
    static UBaseType_t prvNextFunction( void )
    {
    /*函數定義在這里. */
    }
    /*-----------------------------------------------------------*/
    File Layout
    
    /* 函數名寫在一行上,包括返回值類型。左括號前沒有空格。在那里是括號后的空格。結束語前有一個空格括號。
    每個逗號后面都有空格。給出參數詳細的描述性名稱(不像這個示例!)開篇和結尾花括號出現在它們自己的行上,彼此下方排列。*/
    void vAnExampleFunction( long lParameter1, unsigned short usParameter2 )
    {
    /* Variable declarations are not indented. */
    uint8_t ucByte;
    /* Code is indented. Curly brackets are always on their own lines
    and lined up underneath each other. */
    for( ucByte = 0U; ucByte < fileBUFFER_LENGTH; ucByte++ )
    {
    /* Indent again. */
    }
    }
    /* For、while、do和if結構遵循類似的模式。沒有開括號前的空格。開口后有一個空間括號。右括號前有空格。有一個
    每個分號后面有空格(如果有的話)。在和之前有空格在每個運算符后面。不依賴運算符優先級-圓括號總是用來明確表示優先級。,
    除0之外,始終替換為常量或#defined常量。開始和結束的花括號出現在各自的行中。 */
    for( ucByte = 0U; ucByte < fileBUFFER_LENGTH; ucByte++ )
    {
    }
    while( ucByte < fileBUFFER_LENGTH )
    {
    }
    /* 對象中的每個條件都不能依賴操作符優先級多條件決策必須唯一地括起來,所有決策都必須括起來子表達式。
    */
    if( ( ucByte < fileBUFFER_LENGTH ) && ( ucByte != 0U ) )
    {
    /*不依賴運算符優先級的示例! */
    ulResult = ( ( ulValue1 + ulValue2 ) - ulValue3 ) * ulValue4;
    }
    /* 條件編譯的布局和縮進按其他代碼。*/
    #if( configUSE_TRACE_FACILITY == 1 )
    {
    /* Add a counter into the TCB for tracing only. */
    pxNewTCB->uxTCBNumber = uxTaskNumber;
    }
    #endif
    左方括號之后,右方括號之前放置一個空格 方括號。
    ucBuffer[ 0 ] = 0U;
    ucBuffer[ fileBUFFER_LENGTH - 1U ] = 0U;
    Formatting of C Constructs

    下面給出前面提到的三個文件代碼,當然你也可以去官網找到:

    FreeRTOSConfig.h

    /*
    FreeRTOS V7.4.2 - Copyright (C) 2013 Real Time Engineers Ltd.
    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
    ***************************************************************************
    * *
    * FreeRTOS tutorial books are available in pdf and paperback. *
    * Complete, revised, and edited pdf reference manuals are also *
    * available. *
    * *
    * Purchasing FreeRTOS documentation will not only help you, by *
    * ensuring you get running as quickly as possible and with an *
    * in-depth knowledge of how to use FreeRTOS, it will also help *
    * the FreeRTOS project to continue with its mission of providing *
    * professional grade, cross platform, de facto standard solutions *
    * for microcontrollers - completely free of charge! *
    * *
    * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
    * *
    * Thank you for using FreeRTOS, and thank you for your support! *
    * *
    ***************************************************************************
    This file is part of the FreeRTOS distribution.
    FreeRTOS is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License (version 2) as published by the
    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
    >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to
    distribute a combined work that includes FreeRTOS without being obliged to
    provide the source code for proprietary components outside of the FreeRTOS
    kernel.
    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    details. You should have received a copy of the GNU General Public License
    and the FreeRTOS license exception along with FreeRTOS; if not it can be
    viewed here: http://www.freertos.org/a00114.html and also obtained by
    writing to Real Time Engineers Ltd., contact details for whom are available
    on the FreeRTOS WEB site.
    1 tab == 4 spaces!
    ***************************************************************************
    * *
    * Having a problem? Start by reading the FAQ "My application does *
    * not run, what could be wrong?" *
    * *
    * http://www.FreeRTOS.org/FAQHelp.html *
    * *
    ***************************************************************************
    http://www.FreeRTOS.org - Documentation, books, training, latest versions,
    license and Real Time Engineers Ltd. contact details.
    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
    including FreeRTOS+Trace - an indispensable productivity tool, and our new
    fully thread aware and reentrant UDP/IP stack.
    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
    Integrity Systems, who sell the code with commercial support,
    indemnification and middleware, under the OpenRTOS brand.
    http://www.SafeRTOS.com - High Integrity Systems also provide a safety
    engineered and independently SIL3 certified version for use in safety and
    mission critical applications that require provable dependability.
    */
    #ifndef FREERTOS_CONFIG_H
    #define FREERTOS_CONFIG_H
    /*-----------------------------------------------------------
    * Application specific definitions.
    *
    * These definitions should be adjusted for your particular hardware and
    * application requirements.
    *
    * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
    * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
    *
    * See http://www.freertos.org/a00110.html.
    *----------------------------------------------------------*/
    #define configUSE_PREEMPTION 1
    #define configUSE_IDLE_HOOK 0
    #define configUSE_TICK_HOOK 0
    #define configCPU_CLOCK_HZ ( 100000000UL )
    #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
    #define configMAX_PRIORITIES ( 5 )
    #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
    #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) )
    #define configMAX_TASK_NAME_LEN ( 10 )
    #define configUSE_TRACE_FACILITY 0
    #define configUSE_16_BIT_TICKS 0
    #define configIDLE_SHOULD_YIELD 1
    #define configUSE_MUTEXES 1
    #define configQUEUE_REGISTRY_SIZE 8
    #define configCHECK_FOR_STACK_OVERFLOW 0
    #define configUSE_RECURSIVE_MUTEXES 1
    #define configUSE_MALLOC_FAILED_HOOK 1
    #define configUSE_APPLICATION_TASK_TAG 1
    #define configUSE_COUNTING_SEMAPHORES 1
    #define configGENERATE_RUN_TIME_STATS 0
    #define configUSE_QUEUE_SETS 1
    #define configSUPPORT_STATIC_ALLOCATION 1
    #define configSUPPORT_DYNAMIC_ALLOCATION 1
    #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
    /* Co-routine definitions. */
    #define configUSE_CO_ROUTINES 0
    #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
    /* Software timer definitions. */
    #define configUSE_TIMERS 1
    #define configTIMER_TASK_PRIORITY ( 2 )
    #define configTIMER_QUEUE_LENGTH 5
    #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
    /* Set the following definitions to 1 to include the API function, or zero
    to exclude the API function. */
    #define INCLUDE_vTaskPrioritySet 1
    #define INCLUDE_uxTaskPriorityGet 1
    #define INCLUDE_vTaskDelete 1
    #define INCLUDE_vTaskCleanUpResources 1
    #define INCLUDE_vTaskSuspend 1
    #define INCLUDE_vTaskDelayUntil 1
    #define INCLUDE_vTaskDelay 1
    #define INCLUDE_xTimerPendFunctionCall 1
    #define INCLUDE_uxTaskGetStackHighWaterMark 1
    #define INCLUDE_xTaskGetSchedulerState 1
    #define INCLUDE_xTimerGetTimerDaemonTaskHandle 1
    #define INCLUDE_xTaskGetIdleTaskHandle 1
    #define INCLUDE_pcTaskGetTaskName 1
    #define INCLUDE_eTaskGetState 1
    #define INCLUDE_xSemaphoreGetMutexHolder 1
    /* Cortex-M specific definitions. */
    #ifdef __NVIC_PRIO_BITS
    /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
    #define configPRIO_BITS __NVIC_PRIO_BITS
    #else
    #define configPRIO_BITS 6 /* 63 priority levels */
    #endif
    /* The lowest interrupt priority that can be used in a call to a "set priority"
    function. */
    #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x3f
    /* The highest interrupt priority that can be used by any interrupt service
    routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
    INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
    PRIORITY THAN THIS! (higher priorities are lower numeric values. */
    #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
    /* Interrupt priorities used by the kernel port layer itself. These are generic
    to all Cortex-M ports, and do not rely on any particular library functions. */
    #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
    /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
    See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
    #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
    /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
    standard names. */
    #define vPortSVCHandler SVC_Handler
    #define xPortPendSVHandler PendSV_Handler
    #define xPortSysTickHandler SysTick_Handler
    #endif /* FREERTOS_CONFIG_H */

    portmacro.h

    /* DUMMY portmacro.h file for linting without needing to lint a port layer. */
    #ifndef PORTMACRO_H
    #define PORTMACRO_H
    #ifdef __cplusplus
    extern "C" {
    #endif
    /* Type definitions. */
    #define portCHAR char
    #define portFLOAT float
    #define portDOUBLE double
    #define portLONG long
    #define portSHORT short
    #define portSTACK_TYPE uint32_t
    #define portBASE_TYPE long
    typedef portSTACK_TYPE StackType_t;
    typedef long BaseType_t;
    typedef unsigned long UBaseType_t;
    #if( configUSE_16_BIT_TICKS == 1 )
    typedef uint16_t TickType_t;
    #define portMAX_DELAY ( TickType_t ) 0xffff
    #else
    typedef uint32_t TickType_t;
    #define portMAX_DELAY 0xffffffffUL
    /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
    not need to be guarded with a critical section. */
    #define portTICK_TYPE_IS_ATOMIC 1
    #endif
    /*-----------------------------------------------------------*/
    /* Architecture specifics. */
    #define portSTACK_GROWTH ( -1 )
    #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
    #define portBYTE_ALIGNMENT 8
    /*-----------------------------------------------------------*/
    /* Scheduler utilities. */
    #define portYIELD()
    #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD()
    #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
    /*-----------------------------------------------------------*/
    /* Architecture specific optimisations. */
    #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
    #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
    #endif
    #if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
    /* Check the configuration. */
    #if( configMAX_PRIORITIES > 32 )
    #error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.
    #endif
    /* Store/clear the ready priorities in a bit map. */
    #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities )
    #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities )
    /*-----------------------------------------------------------*/
    #include <intrinsics.h>
    #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 0 ); uxReadyPriorities = ( 0 )
    #endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
    /*-----------------------------------------------------------*/
    /* Critical section management. */
    extern void vPortEnterCritical( void );
    extern void vPortExitCritical( void );
    #define portDISABLE_INTERRUPTS()
    #define portENABLE_INTERRUPTS()
    #define portENTER_CRITICAL() vPortEnterCritical()
    #define portEXIT_CRITICAL() vPortExitCritical()
    #define portSET_INTERRUPT_MASK_FROM_ISR() 0
    #define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) ( void ) ( x )
    /* Task function macros as described on the FreeRTOS.org WEB site. */
    #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
    #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )
    /*-----------------------------------------------------------*/
    /* portNOP() is not required by this port. */
    #define portNOP()
    /*-----------------------------------------------------------*/
    #ifdef __cplusplus
    }
    #endif
    #endif /* PORTMACRO_H */

    stdint.h

    我們平常電腦都不太喜歡系統的電腦桌面,想找一些高清的電腦壁紙,卻發現很多都不是高清的,都太模糊。今天小咖就教大家一招,教你在網上尋找電腦高清大圖。

    首先我們需要安裝一個叫做web freer的瀏覽器,這個大家去百度一下,下載完成后安裝然后重啟電腦。

    然后本次教程我們以下面這個圖片為例:

    圖例

    進入此網站http://images.google.com.hk/imghp?hl=zh-CN

    點旁邊的相機圖標

    點旁邊的相機圖標會彈出這個

    按圖片搜索

    上傳圖片那欄不多說,粘貼圖片網址。

    復制圖片網址

    按圖片搜索就行了

    粘貼圖片網址

    找高清大圖請戳全部/大/中/小尺寸,找套圖請戳下面對該圖片的最佳猜測,套圖找到以后,若清晰度不夠請重復以上步驟。

    對該圖片的最佳猜測

    高清圖就這樣找到了。

    高清圖

    更多好玩的好用的電腦軟件、手機軟件及搜索技巧請關注微信公眾號youxuetangtang。

網站首頁   |    關于我們   |    公司新聞   |    產品方案   |    用戶案例   |    售后服務   |    合作伙伴   |    人才招聘   |   

友情鏈接: 餐飲加盟

地址:北京市海淀區    電話:010-     郵箱:@126.com

備案號:冀ICP備2024067069號-3 北京科技有限公司版權所有