diff options
| author | hathach <[email protected]> | 2014-03-06 11:27:22 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-06 11:37:37 +0700 |
| commit | dcc58a7afcd6f02458a5edaca33a5b63418d641f (patch) | |
| tree | a5ed07d5132d411aee3d643e1287b367a9b14884 /demos | |
| parent | de7437852bb0cea3357aac86b87fc91831a7cc86 (diff) | |
refractor app_os_prio.h
Diffstat (limited to 'demos')
| -rw-r--r-- | demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c | 2 | ||||
| -rw-r--r-- | demos/bsp/boards/ngx/board_ngx4330.c | 14 | ||||
| -rw-r--r-- | demos/host/host_cmsis_rtx/.cproject | 2 | ||||
| -rw-r--r-- | demos/host/host_cmsis_rtx/app_os_prio.h | 71 | ||||
| -rw-r--r-- | demos/host/host_freertos/.cproject | 3 | ||||
| -rw-r--r-- | demos/host/host_freertos/host_freertos.ewp | 38 | ||||
| -rw-r--r-- | demos/host/host_freertos/host_freertos.uvopt | 32 | ||||
| -rw-r--r-- | demos/host/host_freertos/host_freertos.uvproj | 6 | ||||
| -rw-r--r-- | demos/host/host_os_none/.cproject | 7 | ||||
| -rw-r--r-- | demos/host/host_os_none/host_os_none.uvopt | 26 | ||||
| -rw-r--r-- | demos/host/src/app_os_prio.h (renamed from demos/host/host_freertos/app_os_prio.h) | 31 | ||||
| -rw-r--r-- | demos/host/src/cdc_serial_app.c | 3 | ||||
| -rw-r--r-- | demos/host/src/keyboard_app.c | 3 | ||||
| -rw-r--r-- | demos/host/src/main.c | 3 | ||||
| -rw-r--r-- | demos/host/src/mouse_app.c | 4 | ||||
| -rw-r--r-- | demos/host/src/msc_app.c | 3 | ||||
| -rw-r--r-- | demos/host/src/rndis_app.c | 3 |
17 files changed, 100 insertions, 151 deletions
diff --git a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c index b5713fb1e..c76b94bda 100644 --- a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c +++ b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.c @@ -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); diff --git a/demos/bsp/boards/ngx/board_ngx4330.c b/demos/bsp/boards/ngx/board_ngx4330.c index c134ff952..4efd4c915 100644 --- a/demos/bsp/boards/ngx/board_ngx4330.c +++ b/demos/bsp/boards/ngx/board_ngx4330.c @@ -75,16 +75,16 @@ void board_init(void) #if CFG_UART_ENABLE
//------------- UART init -------------//
- 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
+ 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;
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
}
diff --git a/demos/host/host_cmsis_rtx/.cproject b/demos/host/host_cmsis_rtx/.cproject index 8d1b776f3..4763e1cc7 100644 --- a/demos/host/host_cmsis_rtx/.cproject +++ b/demos/host/host_cmsis_rtx/.cproject @@ -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=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
@@ -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=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/cmsis_rtos_rtx/INC}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/tinyusb}""/>
diff --git a/demos/host/host_cmsis_rtx/app_os_prio.h b/demos/host/host_cmsis_rtx/app_os_prio.h deleted file mode 100644 index 75c77a64a..000000000 --- a/demos/host/host_cmsis_rtx/app_os_prio.h +++ /dev/null @@ -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_ */ - -/** @} */ diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject index 7d2ac4f6a..c6e0046e4 100644 --- a/demos/host/host_freertos/.cproject +++ b/demos/host/host_freertos/.cproject @@ -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=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/fatfs}""/>
@@ -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=""${workspace_loc:/${ProjName}/bsp/lpc43xx/CMSIS_LPC43xx_DriverLib/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/fatfs}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
@@ -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=""${workspace_loc:/${ProjName}/bsp/lpc175x_6x/CMSISv2p00_LPC17xx/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc175x_6x/LPC17xx_DriverLib/include}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos/freertos/Source/include}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/freertos}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/fatfs}""/>
diff --git a/demos/host/host_freertos/host_freertos.ewp b/demos/host/host_freertos/host_freertos.ewp index c313e6a28..60459446c 100644 --- a/demos/host/host_freertos/host_freertos.ewp +++ b/demos/host/host_freertos/host_freertos.ewp @@ -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>
@@ -2887,6 +2890,39 @@ </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>
<name>class</name>
diff --git a/demos/host/host_freertos/host_freertos.uvopt b/demos/host/host_freertos/host_freertos.uvopt index 98a8b877b..8fcf23373 100644 --- a/demos/host/host_freertos/host_freertos.uvopt +++ b/demos/host/host_freertos/host_freertos.uvopt @@ -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> diff --git a/demos/host/host_freertos/host_freertos.uvproj b/demos/host/host_freertos/host_freertos.uvproj index 1d9fb2cc7..3bd11fe13 100644 --- a/demos/host/host_freertos/host_freertos.uvproj +++ b/demos/host/host_freertos/host_freertos.uvproj @@ -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> diff --git a/demos/host/host_os_none/.cproject b/demos/host/host_os_none/.cproject index e1977f87d..2f11b5528 100644 --- a/demos/host/host_os_none/.cproject +++ b/demos/host/host_os_none/.cproject @@ -52,14 +52,14 @@ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
</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=""${workspace_loc:/${ProjName}/lwip/lwip/src/include/ipv4}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lwip/lpclwip}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lwip/lwip/src/include}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/tinyusb}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
diff --git a/demos/host/host_os_none/host_os_none.uvopt b/demos/host/host_os_none/host_os_none.uvopt index dec0da17d..80b630695 100644 --- a/demos/host/host_os_none/host_os_none.uvopt +++ b/demos/host/host_os_none/host_os_none.uvopt @@ -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> diff --git a/demos/host/host_freertos/app_os_prio.h b/demos/host/src/app_os_prio.h index 1704d8312..99be2de0c 100644 --- a/demos/host/host_freertos/app_os_prio.h +++ b/demos/host/src/app_os_prio.h @@ -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" + +#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 -#define LED_BLINKING_APP_TASK_PRIO (tskIDLE_PRIORITY+1) + 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 } diff --git a/demos/host/src/cdc_serial_app.c b/demos/host/src/cdc_serial_app.c index 6afcd0eed..db97bd87c 100644 --- a/demos/host/src/cdc_serial_app.c +++ b/demos/host/src/cdc_serial_app.c @@ -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
diff --git a/demos/host/src/keyboard_app.c b/demos/host/src/keyboard_app.c index 68437195b..907ae8c2e 100644 --- a/demos/host/src/keyboard_app.c +++ b/demos/host/src/keyboard_app.c @@ -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
diff --git a/demos/host/src/main.c b/demos/host/src/main.c index ef44f6b5e..5f7001202 100644 --- a/demos/host/src/main.c +++ b/demos/host/src/main.c @@ -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"
diff --git a/demos/host/src/mouse_app.c b/demos/host/src/mouse_app.c index 59798691b..60b91f4d2 100644 --- a/demos/host/src/mouse_app.c +++ b/demos/host/src/mouse_app.c @@ -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
diff --git a/demos/host/src/msc_app.c b/demos/host/src/msc_app.c index 520bfa5b1..b7e909cee 100644 --- a/demos/host/src/msc_app.c +++ b/demos/host/src/msc_app.c @@ -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
diff --git a/demos/host/src/rndis_app.c b/demos/host/src/rndis_app.c index f77df8b9a..8371d6985 100644 --- a/demos/host/src/rndis_app.c +++ b/demos/host/src/rndis_app.c @@ -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
|
