More MP1 support.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14781 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
6f7c98e067
commit
aeb5f757d2
|
@ -0,0 +1,111 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file STM32MP1xx/stm32_isr.c
|
||||||
|
* @brief STM32MP1xx ISR handler code.
|
||||||
|
*
|
||||||
|
* @addtogroup STM32MP1xx_ISR
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local definitions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#define exti_serve_irq(pr, channel) { \
|
||||||
|
\
|
||||||
|
if ((pr) & (1U << (channel))) { \
|
||||||
|
_pal_isr_code(channel); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver exported variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver interrupt handlers. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#include "stm32_tim1.inc"
|
||||||
|
#include "stm32_tim2.inc"
|
||||||
|
#include "stm32_tim3.inc"
|
||||||
|
#include "stm32_tim4.inc"
|
||||||
|
#include "stm32_tim5.inc"
|
||||||
|
#include "stm32_tim6.inc"
|
||||||
|
#include "stm32_tim7.inc"
|
||||||
|
#include "stm32_tim8.inc"
|
||||||
|
#include "stm32_tim12.inc"
|
||||||
|
#include "stm32_tim13.inc"
|
||||||
|
#include "stm32_tim14.inc"
|
||||||
|
#include "stm32_tim15.inc"
|
||||||
|
#include "stm32_tim16.inc"
|
||||||
|
#include "stm32_tim17.inc"
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver exported functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables IRQ sources.
|
||||||
|
*
|
||||||
|
* @notapi
|
||||||
|
*/
|
||||||
|
void irqInit(void) {
|
||||||
|
|
||||||
|
tim1_irq_init();
|
||||||
|
tim2_irq_init();
|
||||||
|
tim3_irq_init();
|
||||||
|
tim4_irq_init();
|
||||||
|
tim5_irq_init();
|
||||||
|
tim6_irq_init();
|
||||||
|
tim7_irq_init();
|
||||||
|
tim8_irq_init();
|
||||||
|
tim12_irq_init();
|
||||||
|
tim13_irq_init();
|
||||||
|
tim14_irq_init();
|
||||||
|
tim15_irq_init();
|
||||||
|
tim16_irq_init();
|
||||||
|
tim17_irq_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disables IRQ sources.
|
||||||
|
*
|
||||||
|
* @notapi
|
||||||
|
*/
|
||||||
|
void irqDeinit(void) {
|
||||||
|
|
||||||
|
tim12_irq_deinit();
|
||||||
|
tim13_irq_deinit();
|
||||||
|
tim14_irq_deinit();
|
||||||
|
tim15_irq_deinit();
|
||||||
|
tim16_irq_deinit();
|
||||||
|
tim17_irq_deinit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -0,0 +1,124 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file STM32MP1xx/stm32_isr.h
|
||||||
|
* @brief STM32MP1xx ISR handler header.
|
||||||
|
*
|
||||||
|
* @addtogroup STM32MP1xx_ISR
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef STM32_ISR_H
|
||||||
|
#define STM32_ISR_H
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver constants. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name ISRs suppressed in standard drivers
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define STM32_TIM1_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM2_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM3_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM4_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM5_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM6_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM7_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM8_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM12_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM13_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM14_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM15_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM16_SUPPRESS_ISR
|
||||||
|
#define STM32_TIM17_SUPPRESS_ISR
|
||||||
|
|
||||||
|
#define STM32_USART2_SUPPRESS_ISR
|
||||||
|
#define STM32_USART3_SUPPRESS_ISR
|
||||||
|
#define STM32_UART4_SUPPRESS_ISR
|
||||||
|
#define STM32_UART5_SUPPRESS_ISR
|
||||||
|
#define STM32_USART6_SUPPRESS_ISR
|
||||||
|
#define STM32_UART7_SUPPRESS_ISR
|
||||||
|
#define STM32_UART8_SUPPRESS_ISR
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name ISR names and numbers
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* ADC unit.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DMA unit.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EXTI unit.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FDCAN units.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C units.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TIM units.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USART/UART units.
|
||||||
|
*/
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver pre-compile time settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Derived constants and error checks. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver data structures and types. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver macros. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* External declarations. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void irqInit(void);
|
||||||
|
void irqDeinit(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* STM32_ISR_H */
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -18,7 +18,7 @@
|
||||||
* @file STM32MP1xx/stm32_registry.h
|
* @file STM32MP1xx/stm32_registry.h
|
||||||
* @brief STM32MP1xx capabilities registry.
|
* @brief STM32MP1xx capabilities registry.
|
||||||
*
|
*
|
||||||
* @addtogroup HAL
|
* @addtogroup STM32MP1xx_REGISTRY
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@
|
||||||
/* ETH attributes.*/
|
/* ETH attributes.*/
|
||||||
|
|
||||||
/* EXTI attributes.*/
|
/* EXTI attributes.*/
|
||||||
|
#define STM32_EXTI_NUM_LINES 76
|
||||||
|
#define STM32_EXTI_IMR1_MASK 0xFFFE0000U
|
||||||
|
#define STM32_EXTI_IMR2_MASK 0xFFFFFFFFU
|
||||||
|
#define STM32_EXTI_IMR3_MASK 0xFFFFFDE9U
|
||||||
|
|
||||||
/* Flash attributes.*/
|
/* Flash attributes.*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue