Initial commit
mbed-dev-master/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/TARGET_UBLOX_EVK_ODIN_W2/hal_overrides.c@0:bb348c97df44, 2020-09-16 (annotated)
- Committer:
- lypinator
- Date:
- Wed Sep 16 01:11:49 2020 +0000
- Revision:
- 0:bb348c97df44
Added PWM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lypinator | 0:bb348c97df44 | 1 | /*--------------------------------------------------------------------------- |
lypinator | 0:bb348c97df44 | 2 | * Copyright (c) 2017, u-blox Malmö, All Rights Reserved |
lypinator | 0:bb348c97df44 | 3 | * SPDX-License-Identifier: LicenseRef-PBL |
lypinator | 0:bb348c97df44 | 4 | * |
lypinator | 0:bb348c97df44 | 5 | * This file and the related binary are licensed under the |
lypinator | 0:bb348c97df44 | 6 | * Permissive Binary License, Version 1.0 (the "License"); |
lypinator | 0:bb348c97df44 | 7 | * you may not use these files except in compliance with the License. |
lypinator | 0:bb348c97df44 | 8 | * |
lypinator | 0:bb348c97df44 | 9 | * You may obtain a copy of the License here: |
lypinator | 0:bb348c97df44 | 10 | * LICENSE-permissive-binary-license-1.0.txt and at |
lypinator | 0:bb348c97df44 | 11 | * https://www.mbed.com/licenses/PBL-1.0 |
lypinator | 0:bb348c97df44 | 12 | * |
lypinator | 0:bb348c97df44 | 13 | * See the License for the specific language governing permissions and |
lypinator | 0:bb348c97df44 | 14 | * limitations under the License. |
lypinator | 0:bb348c97df44 | 15 | * |
lypinator | 0:bb348c97df44 | 16 | * Component : HAL |
lypinator | 0:bb348c97df44 | 17 | * File : hal_overrides.c |
lypinator | 0:bb348c97df44 | 18 | * |
lypinator | 0:bb348c97df44 | 19 | * Description : Placeholder for HAL overrides. |
lypinator | 0:bb348c97df44 | 20 | *-------------------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 21 | |
lypinator | 0:bb348c97df44 | 22 | #include "stm32f4xx_hal.h" |
lypinator | 0:bb348c97df44 | 23 | #include "stm32f4xx_hal_rcc.h" |
lypinator | 0:bb348c97df44 | 24 | #include "stm32f4xx_hal_gpio.h" |
lypinator | 0:bb348c97df44 | 25 | |
lypinator | 0:bb348c97df44 | 26 | void HAL_MspInit(void) |
lypinator | 0:bb348c97df44 | 27 | { |
lypinator | 0:bb348c97df44 | 28 | __HAL_RCC_GPIOB_CLK_ENABLE(); |
lypinator | 0:bb348c97df44 | 29 | __HAL_RCC_GPIOE_CLK_ENABLE(); |
lypinator | 0:bb348c97df44 | 30 | |
lypinator | 0:bb348c97df44 | 31 | GPIO_InitTypeDef GPIO_InitDef; |
lypinator | 0:bb348c97df44 | 32 | |
lypinator | 0:bb348c97df44 | 33 | GPIO_InitDef.Pin = GPIO_PIN_6 | GPIO_PIN_8; |
lypinator | 0:bb348c97df44 | 34 | GPIO_InitDef.Mode = GPIO_MODE_OUTPUT_PP; |
lypinator | 0:bb348c97df44 | 35 | GPIO_InitDef.Pull = GPIO_NOPULL; |
lypinator | 0:bb348c97df44 | 36 | GPIO_InitDef.Speed = GPIO_SPEED_FREQ_HIGH; |
lypinator | 0:bb348c97df44 | 37 | HAL_GPIO_Init(GPIOB, &GPIO_InitDef); |
lypinator | 0:bb348c97df44 | 38 | |
lypinator | 0:bb348c97df44 | 39 | GPIO_InitDef.Pin = GPIO_PIN_0; |
lypinator | 0:bb348c97df44 | 40 | HAL_GPIO_Init(GPIOE, &GPIO_InitDef); |
lypinator | 0:bb348c97df44 | 41 | |
lypinator | 0:bb348c97df44 | 42 | HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_SET); |
lypinator | 0:bb348c97df44 | 43 | HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, GPIO_PIN_SET); |
lypinator | 0:bb348c97df44 | 44 | HAL_GPIO_WritePin(GPIOE, GPIO_PIN_0, GPIO_PIN_SET); |
lypinator | 0:bb348c97df44 | 45 | } |