diff options
author | AJM <poslathian@poslathian.(none)> | 2010-04-22 23:27:09 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2010-05-20 22:09:15 -0400 |
commit | a86ec7c81d7ad2037e900899a0b32c5592cae7c0 (patch) | |
tree | 391e3abb0ce95ec6901399bdce628aadf8a0c339 /core/usb/usb_hardware.h | |
parent | a082defb795cc4495139c8b05de4fd48bd66dacd (diff) | |
download | librambutan-a86ec7c81d7ad2037e900899a0b32c5592cae7c0.tar.gz librambutan-a86ec7c81d7ad2037e900899a0b32c5592cae7c0.zip |
c++ ified all of the usb_core files, added the auto-reset feature to the virtual com port, got the descriptors in functional although not pretty order that can be fixed using the attribute packing
Diffstat (limited to 'core/usb/usb_hardware.h')
-rw-r--r-- | core/usb/usb_hardware.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/usb/usb_hardware.h b/core/usb/usb_hardware.h index e60567d..d7e4ff0 100644 --- a/core/usb/usb_hardware.h +++ b/core/usb/usb_hardware.h @@ -25,8 +25,7 @@ #ifndef __HARDWARE_H #define __HARDWARE_H -#include "stm32f10x_type.h" -#include "cortexm3_macro.h" +#include "usb_type.h" /* macro'd register and peripheral definitions */ #define RCC ((u32)0x40021000) @@ -74,6 +73,9 @@ #define SET_REG(addr,val) *(vu32*)(addr)=val #define GET_REG(addr) *(vu32*)(addr) +#if defined(__cplusplus) +extern "C" { +#endif /* todo: there must be some major misunderstanding in how we access regs. The direct access approach (GET_REG) causes the usb init to fail upon trying to activate RCC_APB1 |= 0x00800000. However, using the struct approach @@ -111,7 +113,7 @@ typedef struct { u8 NVIC_IRQChannel; u8 NVIC_IRQChannelPreemptionPriority; u8 NVIC_IRQChannelSubPriority; - bool NVIC_IRQChannelCmd; /* TRUE for enable */ + USB_Bool NVIC_IRQChannelCmd; /* TRUE for enable */ } NVIC_InitTypeDef; typedef struct { @@ -142,4 +144,8 @@ void setupCLK (void); void nvicInit (NVIC_InitTypeDef*); void nvicDisableInterrupts(void); +#if defined(__cplusplus) +} +#endif + #endif |