/*
* FreeRTOS Kernel V10.0.0
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software. If you wish to use our Amazon
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
/* Standard includes. */
#include <stdlib.h>
#include <string.h>
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
all the API functions to use the MPU wrappers. That should only be done when
task.h is included from an application file. */
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "stack_macros.h"
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the
MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined for the
header files above, but not in this file, in order to generate the correct
privileged Vs unprivileged linkage and placement. */
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE /*lint !e961 !e750. */
/* Set configUSE_STATS_FORMATTING_FUNCTIONS to 2 to include the stats formatting
functions but without including stdio.h here. */
#if ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 )
/* At the bottom of this file are two optional functions that can be used
to generate human readable text from the raw data generated by the
uxTaskGetSystemState() function. Note the formatting functions are provided
for convenience only, and are NOT considered part of the kernel. */
#include <stdio.h>
#endif /* configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) */
#if( configUSE_PREEMPTION == 0 )
/* If the cooperative scheduler is being used then a yield should not be
performed just because a higher priority task has been woken. */
#define taskYIELD_IF_USING_PREEMPTION()
#else
#define taskYIELD_IF_USING_PREEMPTION() portYIELD_WITHIN_API()
#endif
/* Values that can be assigned to the ucNotifyState member of the TCB. */
#define taskNOT_WAITING_NOTIFICATION ( ( uint8_t ) 0 )
#define taskWAITING_NOTIFICATION ( ( uint8_t ) 1 )
#define taskNOTIFICATION_RECEIVED ( ( uint8_t ) 2 )
/*
* The value used to fill the stack of a task when the task is created. This
* is used purely for checking the high water mark for tasks.
*/
#define tskSTACK_FILL_BYTE ( 0xa5U )
/* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
dynamically allocated RAM, in which case when any task is deleted it is known
that both the task's stack and TCB need to be freed. Sometimes the
FreeRTOSConfig.h settings only allow a task to be created using statically
allocated RAM, in which case when any task is deleted it is known that neither
the task's stack or TCB should be freed. Sometimes the FreeRTOSConfig.h
settings allow a task to be created using either statically or dynamically
allocated RAM, in which case a member of the TCB is used to record whether the
stack and/or TCB were allocated statically or dynamically, so when a task is
deleted the RAM that was allocated dynamically is freed again and no attempt is
made to free the RAM that was allocated statically.
tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a
task to be created using either statically or dynamically allocated RAM. Note
that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with
a statically allocated stack and a dynamically allocated TCB.
!!!NOTE!!! If the definition of tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is
changed then the definition of StaticTask_t must also be updated. */
#define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
#define tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB ( ( uint8_t ) 0 )
#define tskSTATICALLY_ALLOCATED_STACK_ONLY ( ( uint8_t ) 1 )
#define tskSTATICALLY_ALLOCATED_STACK_AND_TCB ( ( uint8_t ) 2 )
/* If any of the following are set then task stacks are filled with a known
value so the high water mark can be determined. If none of the following are
set then don't fill the stack so there is no unnecessary dependency on memset. */
#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) || ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) )
#define tskSET_NEW_STACKS_TO_KNOWN_VALUE 1
#else
#define tskSET_NEW_STACKS_TO_KNOWN_VALUE 0
#endif
/*
* Macros used by vListTask to indicate which state a task is in.
*/
#define tskBLOCKED_CHAR ( 'B' )
#define tskREADY_CHAR ( 'R' )
#define tskDELETED_CHAR ( 'D' )
#define tskSUSPENDED_CHAR ( 'S' )
/*
* Some kernel aware debuggers require the data the debugger needs access to be
* global, rather than file scope.
*/
#ifdef portREMOVE_STATIC_QUALIFIER
#define static
#endif
/* The name allocated to the Idle task. This can be overridden by defining
configIDLE_TASK_NAME in FreeRTOSConfig.h. */
#ifndef configIDLE_TASK_NAME
#define configIDLE_TASK_NAME "IDLE"
#endif
#if ( configUSE_PORT_OPTIMISED_TASK_SELECTION == 0 )
/* If configUSE_PORT_OPTIMISED_TASK_SELECTION is 0 then task selection is
performed in a generic way that is not optimised to any particular
microcontroller architecture. */
/* uxTopReadyPriority holds the priority of the highest priority ready
state task. */
#define taskRECORD_READY_PRIORITY( uxPriority ) \
{ \
if( ( uxPriority ) > uxTopReadyPriority ) \
{ \
uxTopReadyPriority = ( uxPriority ); \
} \
} /* taskRECORD_READY_PRIORITY */
/*-----------------------------------------------------------*/
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
{ \
UBaseType_t uxTopPriority = uxTopReadyPriority; \
\
/* Find the highest priority queue that contains ready tasks. */ \
while( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxTopPriority ] ) ) ) \
{ \
configASSERT( uxTopPriority ); \
--uxTopPriority; \
} \
\
/* listGET_OWNER_OF_NEXT_ENTRY indexes through the list, so the tasks of \
the same priority get an equal share of the processor time. */ \
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \
uxTopReadyPriority = uxTopPriority; \
} /* taskSELECT_HIGHEST_PRIORITY_TASK */
/*-----------------------------------------------------------*/
/* Define away taskRESET_READY_PRIORITY() and portRESET_READY_PRIORITY() as
they are only required when a port optimised method of task select
没有合适的资源?快使用搜索试试~ 我知道了~
瑞萨单片机USB PCDC示例代码
共1976个文件
h:855个
c:793个
pdf:158个
需积分: 5 5 下载量 40 浏览量
2022-04-14
09:59:41
上传
评论
收藏 145.51MB ZIP 举报
温馨提示
瑞萨单片机USB PCDC示例代码 嵌入式软件开发 USB设备 CDC示例代码
资源详情
资源评论
资源推荐
收起资源包目录
瑞萨单片机USB PCDC示例代码 (1976个子文件)
tasks.c 162KB
tasks.c 162KB
queue.c 92KB
queue.c 92KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_usb_hstdfunction.c 84KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_sci_rx.c 81KB
r_cmt_rx.c 72KB
r_cmt_rx.c 72KB
r_cmt_rx.c 72KB
r_cmt_rx.c 71KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_usbif_api.c 64KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_creg_access.c 61KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_hstdfunction_rtos.c 57KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_usb_pstdrequest.c 53KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_rx_intrinsic_functions.c 50KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_usb_pdriver.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_software_interrupt.c 48KB
r_bsp_interrupts.c 48KB
r_bsp_interrupts.c 48KB
共 1976 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
Jeff-Chen
- 粉丝: 197
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0