Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 5 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /** |
1 | /** |
| 2 | ****************************************************************************** |
2 | ****************************************************************************** |
| 3 | * @file stm32f1xx_hal_pcd.c |
3 | * @file stm32f1xx_hal_pcd.c |
| 4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
| 5 | * @version V1.0.1 |
5 | * @version V1.0.4 |
| 6 | * @date 31-July-2015 |
6 | * @date 29-April-2016 |
| 7 | * @brief PCD HAL module driver. |
7 | * @brief PCD HAL module driver. |
| 8 | * This file provides firmware functions to manage the following |
8 | * This file provides firmware functions to manage the following |
| 9 | * functionalities of the USB Peripheral Controller: |
9 | * functionalities of the USB Peripheral Controller: |
| 10 | * + Initialization and de-initialization functions |
10 | * + Initialization and de-initialization functions |
| 11 | * + IO operation functions |
11 | * + IO operation functions |
| Line 45... | Line 45... | ||
| 45 | 45 | ||
| 46 | @endverbatim |
46 | @endverbatim |
| 47 | ****************************************************************************** |
47 | ****************************************************************************** |
| 48 | * @attention |
48 | * @attention |
| 49 | * |
49 | * |
| 50 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
50 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
| 51 | * |
51 | * |
| 52 | * Redistribution and use in source and binary forms, with or without modification, |
52 | * Redistribution and use in source and binary forms, with or without modification, |
| 53 | * are permitted provided that the following conditions are met: |
53 | * are permitted provided that the following conditions are met: |
| 54 | * 1. Redistributions of source code must retain the above copyright notice, |
54 | * 1. Redistributions of source code must retain the above copyright notice, |
| 55 | * this list of conditions and the following disclaimer. |
55 | * this list of conditions and the following disclaimer. |
| Line 247... | Line 247... | ||
| 247 | * @param hpcd: PCD handle |
247 | * @param hpcd: PCD handle |
| 248 | * @retval None |
248 | * @retval None |
| 249 | */ |
249 | */ |
| 250 | __weak void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) |
250 | __weak void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) |
| 251 | { |
251 | { |
| - | 252 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 253 | UNUSED(hpcd); |
|
| 252 | /* NOTE : This function should not be modified, when the callback is needed, |
254 | /* NOTE : This function should not be modified, when the callback is needed, |
| 253 | the HAL_PCD_MspInit could be implemented in the user file |
255 | the HAL_PCD_MspInit could be implemented in the user file |
| 254 | */ |
256 | */ |
| 255 | } |
257 | } |
| 256 | 258 | ||
| Line 259... | Line 261... | ||
| 259 | * @param hpcd: PCD handle |
261 | * @param hpcd: PCD handle |
| 260 | * @retval None |
262 | * @retval None |
| 261 | */ |
263 | */ |
| 262 | __weak void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd) |
264 | __weak void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd) |
| 263 | { |
265 | { |
| - | 266 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 267 | UNUSED(hpcd); |
|
| 264 | /* NOTE : This function should not be modified, when the callback is needed, |
268 | /* NOTE : This function should not be modified, when the callback is needed, |
| 265 | the HAL_PCD_MspDeInit could be implemented in the user file |
269 | the HAL_PCD_MspDeInit could be implemented in the user file |
| 266 | */ |
270 | */ |
| 267 | } |
271 | } |
| 268 | 272 | ||
| Line 641... | Line 645... | ||
| 641 | * @param epnum: endpoint number |
645 | * @param epnum: endpoint number |
| 642 | * @retval None |
646 | * @retval None |
| 643 | */ |
647 | */ |
| 644 | __weak void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
648 | __weak void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
| 645 | { |
649 | { |
| - | 650 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 651 | UNUSED(hpcd); |
|
| - | 652 | UNUSED(epnum); |
|
| 646 | /* NOTE : This function should not be modified, when the callback is needed, |
653 | /* NOTE : This function should not be modified, when the callback is needed, |
| 647 | the HAL_PCD_DataOutStageCallback could be implemented in the user file |
654 | the HAL_PCD_DataOutStageCallback could be implemented in the user file |
| 648 | */ |
655 | */ |
| 649 | } |
656 | } |
| 650 | 657 | ||
| Line 654... | Line 661... | ||
| 654 | * @param epnum: endpoint number |
661 | * @param epnum: endpoint number |
| 655 | * @retval None |
662 | * @retval None |
| 656 | */ |
663 | */ |
| 657 | __weak void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
664 | __weak void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
| 658 | { |
665 | { |
| - | 666 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 667 | UNUSED(hpcd); |
|
| - | 668 | UNUSED(epnum); |
|
| 659 | /* NOTE : This function should not be modified, when the callback is needed, |
669 | /* NOTE : This function should not be modified, when the callback is needed, |
| 660 | the HAL_PCD_DataInStageCallback could be implemented in the user file |
670 | the HAL_PCD_DataInStageCallback could be implemented in the user file |
| 661 | */ |
671 | */ |
| 662 | } |
672 | } |
| 663 | /** |
673 | /** |
| Line 665... | Line 675... | ||
| 665 | * @param hpcd: PCD handle |
675 | * @param hpcd: PCD handle |
| 666 | * @retval None |
676 | * @retval None |
| 667 | */ |
677 | */ |
| 668 | __weak void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd) |
678 | __weak void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd) |
| 669 | { |
679 | { |
| - | 680 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 681 | UNUSED(hpcd); |
|
| 670 | /* NOTE : This function should not be modified, when the callback is needed, |
682 | /* NOTE : This function should not be modified, when the callback is needed, |
| 671 | the HAL_PCD_SetupStageCallback could be implemented in the user file |
683 | the HAL_PCD_SetupStageCallback could be implemented in the user file |
| 672 | */ |
684 | */ |
| 673 | } |
685 | } |
| 674 | 686 | ||
| Line 677... | Line 689... | ||
| 677 | * @param hpcd: PCD handle |
689 | * @param hpcd: PCD handle |
| 678 | * @retval None |
690 | * @retval None |
| 679 | */ |
691 | */ |
| 680 | __weak void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) |
692 | __weak void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) |
| 681 | { |
693 | { |
| - | 694 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 695 | UNUSED(hpcd); |
|
| 682 | /* NOTE : This function should not be modified, when the callback is needed, |
696 | /* NOTE : This function should not be modified, when the callback is needed, |
| 683 | the HAL_PCD_SOFCallback could be implemented in the user file |
697 | the HAL_PCD_SOFCallback could be implemented in the user file |
| 684 | */ |
698 | */ |
| 685 | } |
699 | } |
| 686 | 700 | ||
| Line 689... | Line 703... | ||
| 689 | * @param hpcd: PCD handle |
703 | * @param hpcd: PCD handle |
| 690 | * @retval None |
704 | * @retval None |
| 691 | */ |
705 | */ |
| 692 | __weak void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd) |
706 | __weak void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd) |
| 693 | { |
707 | { |
| - | 708 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 709 | UNUSED(hpcd); |
|
| 694 | /* NOTE : This function should not be modified, when the callback is needed, |
710 | /* NOTE : This function should not be modified, when the callback is needed, |
| 695 | the HAL_PCD_ResetCallback could be implemented in the user file |
711 | the HAL_PCD_ResetCallback could be implemented in the user file |
| 696 | */ |
712 | */ |
| 697 | } |
713 | } |
| 698 | 714 | ||
| Line 701... | Line 717... | ||
| 701 | * @param hpcd: PCD handle |
717 | * @param hpcd: PCD handle |
| 702 | * @retval None |
718 | * @retval None |
| 703 | */ |
719 | */ |
| 704 | __weak void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd) |
720 | __weak void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd) |
| 705 | { |
721 | { |
| - | 722 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 723 | UNUSED(hpcd); |
|
| 706 | /* NOTE : This function should not be modified, when the callback is needed, |
724 | /* NOTE : This function should not be modified, when the callback is needed, |
| 707 | the HAL_PCD_SuspendCallback could be implemented in the user file |
725 | the HAL_PCD_SuspendCallback could be implemented in the user file |
| 708 | */ |
726 | */ |
| 709 | } |
727 | } |
| 710 | 728 | ||
| Line 713... | Line 731... | ||
| 713 | * @param hpcd: PCD handle |
731 | * @param hpcd: PCD handle |
| 714 | * @retval None |
732 | * @retval None |
| 715 | */ |
733 | */ |
| 716 | __weak void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd) |
734 | __weak void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd) |
| 717 | { |
735 | { |
| - | 736 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 737 | UNUSED(hpcd); |
|
| 718 | /* NOTE : This function should not be modified, when the callback is needed, |
738 | /* NOTE : This function should not be modified, when the callback is needed, |
| 719 | the HAL_PCD_ResumeCallback could be implemented in the user file |
739 | the HAL_PCD_ResumeCallback could be implemented in the user file |
| 720 | */ |
740 | */ |
| 721 | } |
741 | } |
| 722 | 742 | ||
| Line 726... | Line 746... | ||
| 726 | * @param epnum: endpoint number |
746 | * @param epnum: endpoint number |
| 727 | * @retval None |
747 | * @retval None |
| 728 | */ |
748 | */ |
| 729 | __weak void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
749 | __weak void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
| 730 | { |
750 | { |
| - | 751 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 752 | UNUSED(hpcd); |
|
| - | 753 | UNUSED(epnum); |
|
| 731 | /* NOTE : This function should not be modified, when the callback is needed, |
754 | /* NOTE : This function should not be modified, when the callback is needed, |
| 732 | the HAL_PCD_ISOOUTIncompleteCallback could be implemented in the user file |
755 | the HAL_PCD_ISOOUTIncompleteCallback could be implemented in the user file |
| 733 | */ |
756 | */ |
| 734 | } |
757 | } |
| 735 | 758 | ||
| Line 739... | Line 762... | ||
| 739 | * @param epnum: endpoint number |
762 | * @param epnum: endpoint number |
| 740 | * @retval None |
763 | * @retval None |
| 741 | */ |
764 | */ |
| 742 | __weak void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
765 | __weak void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) |
| 743 | { |
766 | { |
| - | 767 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 768 | UNUSED(hpcd); |
|
| - | 769 | UNUSED(epnum); |
|
| 744 | /* NOTE : This function should not be modified, when the callback is needed, |
770 | /* NOTE : This function should not be modified, when the callback is needed, |
| 745 | the HAL_PCD_ISOINIncompleteCallback could be implemented in the user file |
771 | the HAL_PCD_ISOINIncompleteCallback could be implemented in the user file |
| 746 | */ |
772 | */ |
| 747 | } |
773 | } |
| 748 | 774 | ||
| Line 751... | Line 777... | ||
| 751 | * @param hpcd: PCD handle |
777 | * @param hpcd: PCD handle |
| 752 | * @retval None |
778 | * @retval None |
| 753 | */ |
779 | */ |
| 754 | __weak void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd) |
780 | __weak void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd) |
| 755 | { |
781 | { |
| - | 782 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 783 | UNUSED(hpcd); |
|
| 756 | /* NOTE : This function should not be modified, when the callback is needed, |
784 | /* NOTE : This function should not be modified, when the callback is needed, |
| 757 | the HAL_PCD_ConnectCallback could be implemented in the user file |
785 | the HAL_PCD_ConnectCallback could be implemented in the user file |
| 758 | */ |
786 | */ |
| 759 | } |
787 | } |
| 760 | 788 | ||
| Line 763... | Line 791... | ||
| 763 | * @param hpcd: PCD handle |
791 | * @param hpcd: PCD handle |
| 764 | * @retval None |
792 | * @retval None |
| 765 | */ |
793 | */ |
| 766 | __weak void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd) |
794 | __weak void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd) |
| 767 | { |
795 | { |
| - | 796 | /* Prevent unused argument(s) compilation warning */ |
|
| - | 797 | UNUSED(hpcd); |
|
| 768 | /* NOTE : This function should not be modified, when the callback is needed, |
798 | /* NOTE : This function should not be modified, when the callback is needed, |
| 769 | the HAL_PCD_DisconnectCallback could be implemented in the user file |
799 | the HAL_PCD_DisconnectCallback could be implemented in the user file |
| 770 | */ |
800 | */ |
| 771 | } |
801 | } |
| 772 | 802 | ||