Use generic LL headers

This commit is contained in:
Martin Jäger
2021-01-14 19:16:06 +01:00
parent e63a2db9e5
commit 0f109297e4
3 changed files with 10 additions and 34 deletions
+5 -19
View File
@@ -14,25 +14,11 @@
#include <zephyr.h>
#include <drivers/gpio.h>
#if defined(CONFIG_SOC_SERIES_STM32L0X)
#include <stm32l0xx_ll_system.h>
#include <stm32l0xx_ll_adc.h>
#include <stm32l0xx_ll_dac.h>
#include <stm32l0xx_ll_dma.h>
#include <stm32l0xx_ll_bus.h>
#elif defined(CONFIG_SOC_SERIES_STM32F0X)
#include <stm32f0xx_ll_system.h>
#include <stm32f0xx_ll_adc.h>
#include <stm32f0xx_ll_dac.h>
#include <stm32f0xx_ll_dma.h>
#include <stm32f0xx_ll_bus.h>
#elif defined(CONFIG_SOC_SERIES_STM32G4X)
#include <stm32g4xx_ll_system.h>
#include <stm32g4xx_ll_adc.h>
#include <stm32g4xx_ll_dac.h>
#include <stm32g4xx_ll_dma.h>
#include <stm32g4xx_ll_bus.h>
#endif
#include <stm32_ll_system.h>
#include <stm32_ll_adc.h>
#include <stm32_ll_dac.h>
#include <stm32_ll_dma.h>
#include <stm32_ll_bus.h>
#include "dcdc.h" // for low-level control function called by DMA
+1 -5
View File
@@ -17,11 +17,7 @@
#include "leds.h"
#include "mcu.h"
#if defined(CONFIG_SOC_SERIES_STM32L0X)
#include <stm32l0xx_ll_system.h>
#elif defined(CONFIG_SOC_SERIES_STM32G4X)
#include <stm32g4xx_ll_system.h>
#endif
#include <stm32_ll_system.h>
#if DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), load))
#define LOAD_GPIO DT_CHILD(DT_PATH(outputs), load)
+4 -10
View File
@@ -15,20 +15,14 @@
#include "helper.h"
#include "mcu.h"
#if defined(CONFIG_SOC_SERIES_STM32L0X)
#include <stm32l0xx_ll_tim.h>
#include <stm32l0xx_ll_rcc.h>
#include <stm32l0xx_ll_bus.h>
#elif defined(CONFIG_SOC_SERIES_STM32G4X)
#include <stm32g4xx_ll_tim.h>
#include <stm32g4xx_ll_rcc.h>
#include <stm32g4xx_ll_bus.h>
#endif
#if DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), pwm_switch))
#ifndef UNIT_TEST
#include <stm32_ll_tim.h>
#include <stm32_ll_rcc.h>
#include <stm32_ll_bus.h>
// all PWM charge controllers use TIM3 at the moment
static TIM_TypeDef *tim = TIM3;