Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | /******************** (C) COPYRIGHT 2006 STMicroelectronics ******************** |
2 | * File Name : usb_endp.c |
||
3 | * Author : MCD Application Team |
||
4 | * Date First Issued : 10/01/2006 : V1.0 |
||
5 | * Description : Endpoint routines |
||
6 | ******************************************************************************** |
||
7 | * History: |
||
8 | * 10/01/2006 : V1.0 |
||
9 | ******************************************************************************** |
||
10 | * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
||
11 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
||
12 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
||
13 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
||
14 | * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
||
15 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
||
16 | *******************************************************************************/ |
||
17 | /* Includes ------------------------------------------------------------------*/ |
||
18 | #include "main.h" |
||
19 | /* Private typedef -----------------------------------------------------------*/ |
||
20 | /* Private define ------------------------------------------------------------*/ |
||
21 | /* Private macro -------------------------------------------------------------*/ |
||
22 | /* Private variables ---------------------------------------------------------*/ |
||
23 | u8 USB_BufferRx[VIRTUAL_COM_PORT_DATA_SIZE]; |
||
24 | u8 USB_BufferTx[VIRTUAL_COM_PORT_DATA_SIZE]; |
||
25 | u32 USB_BufferRxCount =0; |
||
26 | u32 count_in = 0; |
||
27 | /* Private function prototypes -----------------------------------------------*/ |
||
28 | /* Private functions ---------------------------------------------------------*/ |
||
29 | /******************************************************************************* |
||
30 | * Function Name : EP3_IN_Callback |
||
31 | * Description : |
||
32 | * Input : None. |
||
33 | * Output : None. |
||
34 | * Return : None. |
||
35 | *******************************************************************************/ |
||
36 | void EP3_OUT_Callback(void) |
||
37 | { |
||
38 | //USB_BufferRxCount= GetEPRxCount(ENDP3); |
||
39 | AnzahlEmpfangsBytes = GetEPRxCount(ENDP3); |
||
40 | //PMAToUserBufferCopy(USB_BufferRx, ENDP3_RXADDR, AnzahlEmpfangsBytes ); |
||
41 | PMAToUserBufferCopy((u8*) RxdBuffer, ENDP3_RXADDR, AnzahlEmpfangsBytes); |
||
42 | NeuerDatensatzEmpfangen = 1; |
||
43 | //USB_BufferRx[AnzahlEmpfangsBytes] = 0; |
||
44 | SetEPRxValid(ENDP3); |
||
45 | sprintf(text,"USB (%d): %s\n\r", AnzahlEmpfangsBytes,RxdBuffer ); SerialPutString(text); |
||
46 | |||
47 | // USB_Send_Data(RxdBuffer, AnzahlEmpfangsBytes); |
||
48 | // USB_Send_String("Rx.\0"); |
||
49 | } |
||
50 | /******************************************************************************* |
||
51 | * Function Name : EP1_IN_Callback |
||
52 | * Description : |
||
53 | * Input : None. |
||
54 | * Output : None. |
||
55 | * Return : None. |
||
56 | *******************************************************************************/ |
||
57 | void EP1_IN_Callback(void) |
||
58 | { |
||
59 | count_in =0; |
||
60 | } |
||
61 | /******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/ |
||
62 |