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