STM32: USB: correctly detect when read/write must be called without blocking
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 18 Feb 2011 23:55:18 +0000 (23:55 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 18 Feb 2011 23:55:18 +0000 (23:55 +0000)
commit80ac3ae104b48f42eb8911de0879a477cf812a4c
treeff81492662e785c4a7799c75f6b3317594040be6
parent6bf5ab2e170d0cc235fc7ea2389bc2864142bfe6
STM32: USB: correctly detect when read/write must be called without blocking

Read or write operations with the EP0 may happen within the USB
interrupt.

Make the driver able to understand when the usb_endpointRead() or
usb_endpointWrite() is called from the interrupt context or not.

Basically, only the even callbacks concerning the EP0 should be called
in a interrupt context. For all the other cases the user must take care
of using usb_endpointRead() and usb_endointWrite() from a non-atomic
(sleepable) context.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4717 38d2e660-2303-0410-9eaa-f027e97ec537
bertos/cpu/cortex-m3/drv/usb_stm32.c