house keeping

This commit is contained in:
hathach 2012-11-29 15:40:57 +07:00
parent 360b28b44f
commit 8f57cb6ccb
8 changed files with 13 additions and 7 deletions

View File

@ -24,7 +24,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Debug build" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.lib.debug.341253724" name="Debug" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Debug build" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.lib.debug.341253724" name="Debug" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size -t &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.debug.341253724." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.debug.972883292" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.debug.241809325" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.debug"/>

View File

@ -66,4 +66,5 @@
#endif /* _TUSB_ARCH_H_ */
/** @{ */
/** @} */

View File

@ -57,3 +57,6 @@
#define DEVICE_ROMDRIVER
#endif /* _TUSB_ARCH_LPC134_X_H_ */
/** @} */

View File

@ -53,4 +53,4 @@
#define ALIGNMENT (4)
#endif /* _TUSB_ARM_MX_H_ */
/// @}
/** @} */

View File

@ -91,4 +91,4 @@
#endif /* _TUSB_COMMON_H_ */
/** @{ */
/** @} */

View File

@ -49,7 +49,7 @@
#ifndef _TUSB_ERRORS_H_
#define _TUSB_ERRORS_H_
/** \enum TUSB_Error
/** \enum TUSB_Error_t
* \brief Error Code returned
*/
@ -73,4 +73,4 @@ extern char const* const TUSB_ErrorStr[];
#endif /* _TUSB_ERRORS_H_ */
/** @{ */
/** @} */

View File

@ -41,8 +41,9 @@
#include "descriptors.h"
#include <cr_section_macros.h>
// TODO dcd abstract later
#define USB_ROM_SIZE (1024*2)
uint8_t usb_RomDriver_buffer[USB_ROM_SIZE] ATTR_ALIGNED(2048) __BSS(RAM2);
uint8_t usb_RomDriver_buffer[USB_ROM_SIZE] ATTR_ALIGNED(2048) __DATA(RAM2);
USBD_HANDLE_T g_hUsb;
volatile static bool isConfigured = false;

View File

@ -41,6 +41,7 @@ TUSB_Error_t tusb_init(void)
{
/* HARDWARE INIT */
// TODO usb abstract later
/* Enable AHB clock to the USB block and USB RAM. */
LPC_SYSCON->SYSAHBCLKCTRL |= ((0x1<<14) | (0x1<<27));