soc: ambiq: Optimize the inclusion relationship of header files
Optimized the inclusion relationship of header files Signed-off-by: Hao Luo <hluo@ambiq.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "adc_context.h"
|
||||
|
||||
/* ambiq-sdk includes */
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_REGISTER(adc_ambiq, CONFIG_ADC_LOG_LEVEL);
|
||||
|
||||
@@ -25,7 +25,7 @@ LOG_MODULE_REGISTER(bt_apollox_driver);
|
||||
#include <zephyr/drivers/clock_control.h>
|
||||
#include <zephyr/drivers/clock_control/clock_control_ambiq.h>
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
#include "apollox_blue.h"
|
||||
#if (CONFIG_SOC_SERIES_APOLLO4X)
|
||||
#include "am_devices_cooper.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <zephyr/drivers/clock_control.h>
|
||||
#include <zephyr/drivers/pinctrl.h>
|
||||
#include <zephyr/drivers/clock_control/clock_control_ambiq.h>
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_REGISTER(clock_control_ambiq, CONFIG_CLOCK_CONTROL_LOG_LEVEL);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
/* ambiq-sdk includes */
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
LOG_MODULE_REGISTER(ambiq_counter, CONFIG_COUNTER_LOG_LEVEL);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <zephyr/drivers/flash.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
LOG_MODULE_REGISTER(flash_ambiq, CONFIG_FLASH_LOG_LEVEL);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <zephyr/irq.h>
|
||||
#include <zephyr/spinlock.h>
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
typedef void (*ambiq_gpio_cfg_func_t)(void);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
#include <zephyr/drivers/hwinfo.h>
|
||||
#include <string.h>
|
||||
#include <zephyr/sys/byteorder.h>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <zephyr/pm/policy.h>
|
||||
#include <zephyr/pm/device_runtime.h>
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/mem_mgmt/mem_attr.h>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MSPI_AMBIQ_H_
|
||||
#define MSPI_AMBIQ_H_
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
/* Hand-calculated minimum heap sizes needed to return a successful
|
||||
* 1-byte allocation. See details in lib/os/heap.[ch]
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <zephyr/drivers/pinctrl.h>
|
||||
|
||||
/* ambiq-sdk includes */
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
static void pinctrl_configure_pin(const pinctrl_soc_pin_t *pin)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
LOG_MODULE_REGISTER(ambiq_rtc, CONFIG_RTC_LOG_LEVEL);
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#define AMBIQ_RTC_ALARM_TIME_MASK \
|
||||
(RTC_ALARM_TIME_MASK_SECOND | RTC_ALARM_TIME_MASK_MINUTE | RTC_ALARM_TIME_MASK_HOUR | \
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <zephyr/pm/policy.h>
|
||||
#include <zephyr/pm/device_runtime.h>
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
LOG_MODULE_REGISTER(ambiq_sdio, CONFIG_SDHC_LOG_LEVEL);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <zephyr/pm/policy.h>
|
||||
|
||||
#include "uart_pl011_registers.h"
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
static inline void pl011_ambiq_enable_clk(const struct device *dev)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(spi_ambiq_bleif);
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "spi_context.h"
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
struct spi_ambiq_config {
|
||||
uint32_t base;
|
||||
|
||||
@@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(spi_ambiq);
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "spi_context.h"
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/mem_mgmt/mem_attr.h>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(spi_ambiq_spid);
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "spi_context.h"
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#define SPID_ADDR_INTERVAL 1
|
||||
struct spi_ambiq_config {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <zephyr/spinlock.h>
|
||||
|
||||
/* ambiq-sdk includes */
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#define COUNTER_MAX UINT32_MAX
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include <soc.h>
|
||||
#include "am_mcu_apollo.h"
|
||||
#include <string.h>
|
||||
#include <zephyr/drivers/clock_control/clock_control_ambiq.h>
|
||||
#include <zephyr/sys/util.h>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <zephyr/drivers/watchdog.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_REGISTER(wdt_ambiq, CONFIG_WDT_LOG_LEVEL);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <zephyr/init.h>
|
||||
|
||||
/* ambiq-sdk includes */
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <zephyr/init.h>
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
extern void ambiq_power_init(void);
|
||||
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
#ifndef __SOC_H__
|
||||
#define __SOC_H__
|
||||
|
||||
#if defined(CONFIG_SOC_APOLLO3P_BLUE)
|
||||
#include <apollo3p.h>
|
||||
#elif defined(CONFIG_SOC_APOLLO3_BLUE)
|
||||
#include <apollo3.h>
|
||||
#endif
|
||||
#include <am_mcu_apollo.h>
|
||||
|
||||
#endif /* __SOC_H__ */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <zephyr/init.h>
|
||||
|
||||
/* ambiq-sdk includes */
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <zephyr/init.h>
|
||||
|
||||
#include <am_mcu_apollo.h>
|
||||
#include <soc.h>
|
||||
|
||||
extern void ambiq_power_init(void);
|
||||
void soc_early_init_hook(void)
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
#ifndef __SOC_H__
|
||||
#define __SOC_H__
|
||||
|
||||
#include <apollo4p.h>
|
||||
#include <am_mcu_apollo.h>
|
||||
|
||||
#endif /* __SOC_H__ */
|
||||
|
||||
Reference in New Issue
Block a user