refractor app_os_prio.h

This commit is contained in:
hathach 2014-03-06 11:27:22 +07:00
parent de7437852b
commit dcc58a7afc
19 changed files with 540 additions and 585 deletions

View File

@ -73,7 +73,7 @@ void board_init(void)
UART_CFG_Type UARTConfigStruct;
UART_ConfigStructInit(&UARTConfigStruct);
UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE;
UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE;
UARTConfigStruct.Clock_Speed = 0;
UART_Init(BOARD_UART_PORT, &UARTConfigStruct);

View File

@ -75,16 +75,16 @@ void board_init(void)
#if CFG_UART_ENABLE
//------------- UART init -------------//
scu_pinmux(0x6 ,4, MD_PDN | MD_EZI, FUNC2); // UART0_TXD
scu_pinmux(0x6 ,5, MD_PDN | MD_EZI, FUNC2); // UART0_RXD
UART_CFG_Type UARTConfigStruct;
scu_pinmux(0x6 ,4, MD_PDN|MD_EZI, FUNC2); // UART0_TXD
scu_pinmux(0x6 ,5, MD_PDN|MD_EZI, FUNC2); // UART0_RXD
UART_ConfigStructInit(&UARTConfigStruct); // default: baud = 9600, 8 bit data, 1 stop bit, no parity
UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE; // Re-configure baudrate
UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE; // Re-configure baudrate
UARTConfigStruct.Clock_Speed = 0;
UART_Init((LPC_USARTn_Type*) LPC_USART0, &UARTConfigStruct); // Initialize UART port
UART_TxCmd((LPC_USARTn_Type*) LPC_USART0, ENABLE); // Enable UART
UART_Init(BOARD_UART_PORT, &UARTConfigStruct);
UART_TxCmd(BOARD_UART_PORT, ENABLE); // Enable UART
#endif
}

View File

@ -46,7 +46,6 @@
<option id="gnu.c.compiler.option.misc.other.898778785" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.970795437" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos/freertos/Source/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp}&quot;"/>
@ -708,7 +707,6 @@
<option id="gnu.c.compiler.option.misc.other.740032111" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.967143576" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/cmsis_rtos_rtx/INC}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/tinyusb}&quot;"/>

View File

@ -1,71 +0,0 @@
/**************************************************************************/
/*!
@file app_os_prio.h
@author hathach (tinyusb.org)
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2013, hathach (tinyusb.org)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holders nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This file is part of the tinyusb stack.
*/
/**************************************************************************/
/** \file
* \brief TBD
*
* \note TBD
*/
/** \ingroup TBD
* \defgroup TBD
* \brief TBD
*
* @{
*/
#ifndef _TUSB_APP_OS_PRIO_H_
#define _TUSB_APP_OS_PRIO_H_
#ifdef __cplusplus
extern "C" {
#endif
#define KEYBOARD_APP_TASK_PRIO osPriorityNormal
#define MOUSE_APP_TASK_PRIO osPriorityNormal
#define LED_BLINKING_APP_TASK_PRIO osPriorityNormal
#define CDC_SERIAL_APP_TASK_PRIO osPriorityNormal
#ifdef __cplusplus
}
#endif
#endif /* _TUSB_APP_OS_PRIO_H_ */
/** @} */

View File

@ -47,7 +47,6 @@
<option id="gnu.c.compiler.option.misc.other.898778785" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.970795437" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos/freertos/Source/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/fatfs}&quot;"/>
@ -937,7 +936,6 @@
<option id="gnu.c.compiler.option.include.paths.967143576" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/fatfs}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos/freertos/Source/include}&quot;"/>
@ -1901,7 +1899,6 @@
<option id="gnu.c.compiler.option.include.paths.643947484" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp/lpc175x_6x/CMSISv2p00_LPC17xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp/lpc175x_6x/LPC17xx_DriverLib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos/freertos/Source/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/fatfs}&quot;"/>

View File

@ -167,7 +167,8 @@
<state>CORE_M4</state>
<state>TUSB_CFG_MCU=MCU_LPC43XX</state>
<state>BOARD=BOARD_EA4357</state>
<state>TUSB_CFG_OS=TUSB_OS_NONE</state>
<state>TUSB_CFG_OS=TUSB_OS_FREERTOS</state>
<state>TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -301,6 +302,8 @@
<state>$PROJ_DIR$\..\..\bsp</state>
<state>$PROJ_DIR$\..\..\..\tinyusb</state>
<state>$PROJ_DIR$\..\..\..\vendor\fatfs</state>
<state>$PROJ_DIR$\..\..\..\vendor\freertos</state>
<state>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\include</state>
</option>
<option>
<name>CCStdIncCheck</name>
@ -2886,6 +2889,39 @@
<name>$PROJ_DIR$\..\..\..\vendor\fatfs\ff.c</name>
</file>
</group>
<group>
<name>freertos</name>
<group>
<name>CM4F</name>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\portable\IAR\ARM_CM4F\port.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\portable\IAR\ARM_CM4F\portasm.s</name>
</file>
</group>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\croutine.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertoslpc\FreeRTOSCommonHooks.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\portable\MemMang\heap_4.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\list.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\queue.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\tasks.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\vendor\freertos\freertos\Source\timers.c</name>
</file>
</group>
<group>
<name>tinyusb</name>
<group>

View File

@ -73,7 +73,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>8</CpuCode>
<DllOpt>
@ -555,7 +555,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>8</CpuCode>
<Books>
@ -706,8 +706,8 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>121</TopLine>
<CurrentLine>122</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
@ -752,10 +752,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>7</ColumnNumber>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>73</TopLine>
<CurrentLine>74</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\mouse_app.c</PathWithFileName>
<FilenameWithoutPath>mouse_app.c</FilenameWithoutPath>
@ -1168,10 +1168,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>34</ColumnNumber>
<ColumnNumber>10</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>79</TopLine>
<CurrentLine>88</CurrentLine>
<TopLine>80</TopLine>
<CurrentLine>85</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\freertos\freertoslpc\FreeRTOSCommonHooks.c</PathWithFileName>
<FilenameWithoutPath>FreeRTOSCommonHooks.c</FilenameWithoutPath>
@ -1234,7 +1234,7 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>2113</TopLine>
<TopLine>2114</TopLine>
<CurrentLine>2115</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\freertos\freertos\Source\tasks.c</PathWithFileName>
@ -1352,9 +1352,9 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>22</ColumnNumber>
<ColumnNumber>23</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>1718</TopLine>
<TopLine>1719</TopLine>
<CurrentLine>1723</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\fatfs\ff.c</PathWithFileName>
@ -1546,7 +1546,7 @@
<Focus>0</Focus>
<ColumnNumber>30</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>144</TopLine>
<TopLine>145</TopLine>
<CurrentLine>150</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName>
@ -1654,7 +1654,7 @@
<Group>
<GroupName>bsp lpc175x_6x</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -1762,7 +1762,7 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>123</TopLine>
<TopLine>124</TopLine>
<CurrentLine>129</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\lpc175x_6x\startup_keil\startup_LPC17xx.s</PathWithFileName>

View File

@ -350,7 +350,7 @@
<MiscControls>--gnu --c99 --diag_suppress=66</MiscControls>
<Define>CORE_M4 TUSB_CFG_MCU=MCU_LPC43XX BOARD=BOARD_EA4357 TUSB_CFG_OS=TUSB_OS_FREERTOS TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</Define>
<Undefine></Undefine>
<IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos;..\..\..\vendor\fatfs</IncludePath>
<IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\..\..\vendor\fatfs</IncludePath>
</VariousControls>
</Cads>
<Aads>
@ -2020,7 +2020,7 @@
<MiscControls>--gnu --c99 --diag_suppress=66</MiscControls>
<Define>TUSB_CFG_MCU=MCU_LPC175X_6X BOARD=BOARD_LPCXPRESSO1769 TUSB_CFG_OS=TUSB_OS_FREERTOS TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</Define>
<Undefine></Undefine>
<IncludePath>..\src;..\..\bsp\lpc175x_6x\CMSISv2p00_LPC17xx\inc;..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\include;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos;..\..\..\vendor\fatfs</IncludePath>
<IncludePath>..\src;..\..\bsp\lpc175x_6x\CMSISv2p00_LPC17xx\inc;..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\include;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\..\..\vendor\fatfs</IncludePath>
</VariousControls>
</Cads>
<Aads>
@ -2855,7 +2855,7 @@
<MiscControls>--gnu --c99 --diag_suppress=66</MiscControls>
<Define>CORE_M4 TUSB_CFG_MCU=MCU_LPC43XX BOARD=BOARD_NGX4330 TUSB_CFG_OS=TUSB_OS_FREERTOS TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5</Define>
<Undefine></Undefine>
<IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos;..\..\..\vendor\fatfs</IncludePath>
<IncludePath>..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\..\..\vendor\fatfs</IncludePath>
</VariousControls>
</Cads>
<Aads>

View File

@ -52,14 +52,14 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.861665028" name="C Dialect" superClass="com.crt.advproject.c.misc.dialect" value="com.crt.advproject.misc.dialect.gnu99" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.fpu.858901448" superClass="com.crt.advproject.gcc.fpu" value="com.crt.advproject.gcc.fpu.fpv4" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.fpu.858901448" name="Floating point" superClass="com.crt.advproject.gcc.fpu" value="com.crt.advproject.gcc.fpu.fpv4" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.217124913" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.gas.exe.debug.1376287865" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug">
<option id="com.crt.advproject.gas.arch.1664735680" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm4" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.572061543" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.884423800" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -D__REDLIB__ -DDEBUG -D__CODE_RED" valueType="string"/>
<option id="com.crt.advproject.gas.fpu.1152943186" superClass="com.crt.advproject.gas.fpu" value="com.crt.advproject.gas.fpu.fpv4" valueType="enumerated"/>
<option id="com.crt.advproject.gas.fpu.1152943186" name="Floating point" superClass="com.crt.advproject.gas.fpu" value="com.crt.advproject.gas.fpu.fpv4" valueType="enumerated"/>
<inputType id="com.crt.advproject.assembler.input.1812008425" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1488844340" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
@ -77,7 +77,7 @@
<option id="gnu.c.link.option.libs.1088600788" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
<option id="gnu.c.link.option.paths.1352371726" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
<option id="com.crt.advproject.link.gcc.hdrlib.1912639139" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.semihost" valueType="enumerated"/>
<option id="com.crt.advproject.link.fpu.1467962306" superClass="com.crt.advproject.link.fpu" value="com.crt.advproject.link.fpu.fpv4" valueType="enumerated"/>
<option id="com.crt.advproject.link.fpu.1467962306" name="Floating point" superClass="com.crt.advproject.link.fpu" value="com.crt.advproject.link.fpu.fpv4" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1768732506" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
@ -142,7 +142,6 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lwip/lwip/src/include/ipv4}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lwip/lpclwip}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lwip/lwip/src/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/tinyusb}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>

View File

@ -972,10 +972,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>54</ColumnNumber>
<ColumnNumber>36</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>125</TopLine>
<CurrentLine>137</CurrentLine>
<TopLine>126</TopLine>
<CurrentLine>138</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\mouse_app.c</PathWithFileName>
<FilenameWithoutPath>mouse_app.c</FilenameWithoutPath>
@ -1004,10 +1004,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>38</ColumnNumber>
<ColumnNumber>12</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>138</TopLine>
<CurrentLine>150</CurrentLine>
<TopLine>140</TopLine>
<CurrentLine>152</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\msc_app.c</PathWithFileName>
<FilenameWithoutPath>msc_app.c</FilenameWithoutPath>
@ -1034,7 +1034,7 @@
<Group>
<GroupName>tinyusb</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -1484,9 +1484,9 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>8</ColumnNumber>
<ColumnNumber>12</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>3186</TopLine>
<TopLine>3187</TopLine>
<CurrentLine>3196</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\fatfs\ff.c</PathWithFileName>
@ -1558,7 +1558,7 @@
<Focus>0</Focus>
<ColumnNumber>17</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>80</TopLine>
<TopLine>81</TopLine>
<CurrentLine>90</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\boards\printf_retarget.c</PathWithFileName>
@ -1692,10 +1692,10 @@
<FileType>2</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>30</ColumnNumber>
<ColumnNumber>18</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>147</TopLine>
<CurrentLine>153</CurrentLine>
<TopLine>148</TopLine>
<CurrentLine>163</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName>
<FilenameWithoutPath>startup_LPC43xx.s</FilenameWithoutPath>

View File

@ -36,12 +36,6 @@
*/
/**************************************************************************/
/** \file
* \brief TBD
*
* \note TBD
*/
/** \ingroup TBD
* \defgroup TBD
* \brief TBD
@ -57,12 +51,27 @@
extern "C" {
#endif
#define KEYBOARD_APP_TASK_PRIO (TUSB_CFG_OS_TASK_PRIO-2)
#define MOUSE_APP_TASK_PRIO KEYBOARD_APP_TASK_PRIO
#define CDC_SERIAL_APP_TASK_PRIO KEYBOARD_APP_TASK_PRIO
#define MSC_APP_TASK_PRIO KEYBOARD_APP_TASK_PRIO
#include "tusb.h"
#define LED_BLINKING_APP_TASK_PRIO (tskIDLE_PRIORITY+1)
#if TUSB_CFG_OS == TUSB_OS_NONE
#define LOWER_PRIO(x) 0 // does not matter
#elif TUSB_CFG_OS == TUSB_OS_FREERTOS
#define LOWER_PRIO(x) ((x)-1) // freeRTOS lower number --> lower priority
#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
#define LOWER_PRIO(x) ((x)-1) // CMSIS-RTOS lower number --> lower priority
#else
#error Priority is not configured for this RTOS
#endif
enum {
STANDARD_APP_TASK_PRIO = LOWER_PRIO(TUSB_CFG_OS_TASK_PRIO), // Application Task is lower than usb system task
LED_BLINKING_APP_TASK_PRIO = LOWER_PRIO(STANDARD_APP_TASK_PRIO), // Blinking task is lower than normal task
KEYBOARD_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO,
MOUSE_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO,
CDC_SERIAL_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO,
MSC_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO
};
#ifdef __cplusplus
}

View File

@ -37,10 +37,7 @@
/**************************************************************************/
#include "cdc_serial_app.h"
#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
#endif
#if TUSB_CFG_HOST_CDC

View File

@ -40,10 +40,7 @@
// INCLUDE
//--------------------------------------------------------------------+
#include "keyboard_app.h"
#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
#endif
#if TUSB_CFG_HOST_HID_KEYBOARD

View File

@ -46,10 +46,7 @@
#include "boards/board.h"
#include "tusb.h"
#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
#endif
#include "mouse_app.h"
#include "keyboard_app.h"
#include "msc_app.h"

View File

@ -40,11 +40,7 @@
// INCLUDE
//--------------------------------------------------------------------+
#include "mouse_app.h"
#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
#endif
#if TUSB_CFG_HOST_HID_MOUSE

View File

@ -40,10 +40,7 @@
// INCLUDE
//--------------------------------------------------------------------+
#include "msc_app.h"
#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
#endif
#if TUSB_CFG_HOST_MSC

View File

@ -37,10 +37,7 @@
/**************************************************************************/
#include "rndis_app.h"
#if TUSB_CFG_OS != TUSB_OS_NONE
#include "app_os_prio.h"
#endif
#if TUSB_CFG_HOST_CDC && TUSB_CFG_HOST_CDC_RNDIS

View File

@ -62,12 +62,12 @@
#include "mcu_capacity.h"
#ifdef TUSB_CFG_CONFIG_FILE
#include TUSB_CFG_CONFIG_FILE
#else
#include "tusb_config.h"
#ifndef TUSB_CFG_CONFIG_FILE
#define TUSB_CFG_CONFIG_FILE "tusb_config.h"
#endif
#include TUSB_CFG_CONFIG_FILE
//--------------------------------------------------------------------+
// CONTROLLER
//--------------------------------------------------------------------+

View File

@ -73,8 +73,39 @@
#ifndef PORTABLE_H
#define PORTABLE_H
/* Include the macro file relevant to the port being used. */
//--------------------------------------------------------------------+
// TinyUSB modification
//--------------------------------------------------------------------+
#if defined __CC_ARM
#if __CORTEX_M == 4 // TODO M0 M4
#define PORTMACRO_PATH "../portable/RVDS/ARM_CM4F/portmacro.h"
#elif __CORTEX_M == 3
#define PORTMACRO_PATH "../portable/RVDS/ARM_CM3/portmacro.h"
#endif
#elif defined __GNUC__
#if __CORTEX_M == 4 // TODO M0 M4
#define PORTMACRO_PATH "../portable/GCC/ARM_CM4F/portmacro.h"
#elif __CORTEX_M == 3
#define PORTMACRO_PATH "../portable/GCC/ARM_CM3/portmacro.h"
#endif
#elif defined __ICCARM__
#if __CORTEX_M == 4 // TODO M0 M4
#define PORTMACRO_PATH "../portable/IAR/ARM_CM4F/portmacro.h"
#elif __CORTEX_M == 3
#define PORTMACRO_PATH "../portable/IAR/ARM_CM3/portmacro.h"
#endif
#endif
#ifndef PORTMACRO_PATH
#error portmacro.h path is not defined for this toolchain and/or MCU
#endif
#include PORTMACRO_PATH
/* Include the macro file relevant to the port being used. */
#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
#include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
typedef void ( __interrupt __far *pxISR )();
@ -312,31 +343,6 @@
#include "../../Source/portable/IAR/78K0R/portmacro.h"
#endif
//--------------------------------------------------------------------+
// TinyUSB modification
//--------------------------------------------------------------------+
#if defined __CC_ARM
#if __CORTEX_M == 4 // TODO M0 M4
#define PORTMACRO_PATH "../portable/RVDS/ARM_CM4F/portmacro.h"
#elif __CORTEX_M == 3
#define PORTMACRO_PATH "../portable/RVDS/ARM_CM3/portmacro.h"
#endif
#elif defined __GNUC__
#if __CORTEX_M == 4 // TODO M0 M4
#define PORTMACRO_PATH "../portable/GCC/ARM_CM4F/portmacro.h"
#elif __CORTEX_M == 3
#define PORTMACRO_PATH "../portable/GCC/ARM_CM3/portmacro.h"
#endif
#endif
#ifndef PORTMACRO_PATH
#error portmacro.h path is not defined for this toolchain and/or MCU
#endif
#include PORTMACRO_PATH
/* Catch all to ensure portmacro.h is included in the build. Newer demos
have the path as part of the project options, rather than as relative from
the project location. If portENTER_CRITICAL() has not been defined then