USB enhancements, phase two.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3451 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2011-10-23 12:21:44 +00:00
parent 53df7ed814
commit 2f572f109a
5 changed files with 31 additions and 4 deletions

View File

@ -135,6 +135,16 @@
#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
#define VAL_GPIOEODR 0xFFFFFFFF
/*
* USB bus activation macro, required by the USB driver.
*/
#define usb_lld_connect_bus(usbp) palClearPad(GPIOC, GPIOC_USB_DISC)
/*
* USB bus de-activation macro, required by the USB driver.
*/
#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOC, GPIOC_USB_DISC)
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {

View File

@ -321,6 +321,16 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
* @name Macro Functions
* @{
*/
/**
* @brief Connects the USB device.
*/
#define usbConnectBus(usbp) usb_lld_connect_bus(usbp)
/**
* @brief Disconnect the USB device.
*/
#define usbDisconnectBus(usbp) usb_lld_disconnect_bus(usbp)
/**
* @brief Returns the current frame number.
*

View File

@ -204,7 +204,7 @@ static msg_t shell_thread(void *p) {
there is not a chSysUnlock() because the thread terminates upon return.*/
chSysLock();
chEvtBroadcastI(&shell_terminated);
return msg;
chThdExitS(msg);
}
/**

View File

@ -76,9 +76,15 @@
*** 2.3.4 ***
- FIX: Fixed broken TIM8 support in STM32 PWM driver (bug 3418620).
- FIX: Fixed halconf.h file corrupted in some STM32 demos (bug 3418626).
- NEW: Updated USB driver model and STM32 implementation. Updated the
SERIAL_USB driver to match the new API. Fixed several problems in
both drivers.
- NEW: Updated USB driver model and STM32 implementation and fixed several
problems.
- Changed the API to move buffer copy operations out of critical zones.
- Added usbConnectBus() and usbDisconnectBus() functions.
- Fixed problems with incorrect assertions.
- NEW Updated the SERIAL_USB driver to match the new USB API, also fixed
some problems.
- Fixed incorrect use of input queues, the change required a change in
input queues too.
- NEW: Added a macro THD_STATE_NAMES to chthreads.h. This macro is an
initializer for string arrays containing thread state names.
- NEW: Added memory copy functionality to the STM32 DMA driver.

View File

@ -421,6 +421,7 @@ int main(void) {
*/
sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg);
usbConnectBus(serusbcfg.usbp);
palClearPad(GPIOC, GPIOC_USB_DISC);
/*