You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.8 KiB

  1. /*
  2. Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /*
  14. * This file has been automatically generated using ChibiStudio board
  15. * generator plugin. Do not edit manually.
  16. */
  17. #include "hal.h"
  18. /*===========================================================================*/
  19. /* Driver local definitions. */
  20. /*===========================================================================*/
  21. /*===========================================================================*/
  22. /* Driver exported variables. */
  23. /*===========================================================================*/
  24. /*===========================================================================*/
  25. /* Driver local variables and types. */
  26. /*===========================================================================*/
  27. /*===========================================================================*/
  28. /* Driver local functions. */
  29. /*===========================================================================*/
  30. static void wb32_gpio_init(void) {
  31. #if WB32_HAS_GPIOA
  32. rccEnableAPB1(RCC_APB1ENR_GPIOAEN);
  33. #endif
  34. #if WB32_HAS_GPIOB
  35. rccEnableAPB1(RCC_APB1ENR_GPIOBEN);
  36. #endif
  37. #if WB32_HAS_GPIOC
  38. rccEnableAPB1(RCC_APB1ENR_GPIOCEN);
  39. #endif
  40. #if WB32_HAS_GPIOD
  41. rccEnableAPB1(RCC_APB1ENR_GPIODEN);
  42. #endif
  43. }
  44. /*===========================================================================*/
  45. /* Driver interrupt handlers. */
  46. /*===========================================================================*/
  47. /*===========================================================================*/
  48. /* Driver exported functions. */
  49. /*===========================================================================*/
  50. /*
  51. * Early initialization code.
  52. * This initialization must be performed just after stack setup and before
  53. * any other initialization.
  54. */
  55. void __early_init(void) {
  56. wb32_clock_init();
  57. wb32_gpio_init();
  58. }
  59. /**
  60. * @brief Board-specific initialization code.
  61. * @note You can add your board-specific code here.
  62. */
  63. void boardInit(void) {
  64. }