Skip to content

Commit dd16cb7

Browse files
committed
Updated ChibiOS to 3.0.5
1 parent f4b31b8 commit dd16cb7

File tree

531 files changed

+183053
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

531 files changed

+183053
-2
lines changed

ChibiOS_3.0.5/ext/readme.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
All the code contained under ./ext is not part of the ChibiOS project and
2+
supplied as-is without any additional warranty by ChibiOS. For ownership and
3+
copyright statements see the license details inside the code.
4+
5+
Some modules may contain changes from the ChibiOS team in order to increase
6+
compatibility or usability with ChibiOS itself.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
/**
2+
******************************************************************************
3+
* @file misc.h
4+
* @author MCD Application Team
5+
* @version V1.6.0
6+
* @date 10-July-2015
7+
* @brief This file contains all the functions prototypes for the miscellaneous
8+
* firmware library functions (add-on to CMSIS functions).
9+
******************************************************************************
10+
* @attention
11+
*
12+
* <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
13+
*
14+
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15+
* You may not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at:
17+
*
18+
* http://www.st.com/software_license_agreement_liberty_v2
19+
*
20+
* Unless required by applicable law or agreed to in writing, software
21+
* distributed under the License is distributed on an "AS IS" BASIS,
22+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23+
* See the License for the specific language governing permissions and
24+
* limitations under the License.
25+
*
26+
******************************************************************************
27+
*/
28+
29+
/* Define to prevent recursive inclusion -------------------------------------*/
30+
#ifndef __MISC_H
31+
#define __MISC_H
32+
33+
#ifdef __cplusplus
34+
extern "C" {
35+
#endif
36+
37+
/* Includes ------------------------------------------------------------------*/
38+
#include "stm32f4xx.h"
39+
40+
/** @addtogroup STM32F4xx_StdPeriph_Driver
41+
* @{
42+
*/
43+
44+
/** @addtogroup MISC
45+
* @{
46+
*/
47+
48+
/* Exported types ------------------------------------------------------------*/
49+
50+
/**
51+
* @brief NVIC Init Structure definition
52+
*/
53+
54+
typedef struct
55+
{
56+
uint8_t NVIC_IRQChannel; /*!< Specifies the IRQ channel to be enabled or disabled.
57+
This parameter can be an enumerator of @ref IRQn_Type
58+
enumeration (For the complete STM32 Devices IRQ Channels
59+
list, please refer to stm32f4xx.h file) */
60+
61+
uint8_t NVIC_IRQChannelPreemptionPriority; /*!< Specifies the pre-emption priority for the IRQ channel
62+
specified in NVIC_IRQChannel. This parameter can be a value
63+
between 0 and 15 as described in the table @ref MISC_NVIC_Priority_Table
64+
A lower priority value indicates a higher priority */
65+
66+
uint8_t NVIC_IRQChannelSubPriority; /*!< Specifies the subpriority level for the IRQ channel specified
67+
in NVIC_IRQChannel. This parameter can be a value
68+
between 0 and 15 as described in the table @ref MISC_NVIC_Priority_Table
69+
A lower priority value indicates a higher priority */
70+
71+
FunctionalState NVIC_IRQChannelCmd; /*!< Specifies whether the IRQ channel defined in NVIC_IRQChannel
72+
will be enabled or disabled.
73+
This parameter can be set either to ENABLE or DISABLE */
74+
} NVIC_InitTypeDef;
75+
76+
/* Exported constants --------------------------------------------------------*/
77+
78+
/** @defgroup MISC_Exported_Constants
79+
* @{
80+
*/
81+
82+
/** @defgroup MISC_Vector_Table_Base
83+
* @{
84+
*/
85+
86+
#define NVIC_VectTab_RAM ((uint32_t)0x20000000)
87+
#define NVIC_VectTab_FLASH ((uint32_t)0x08000000)
88+
#define IS_NVIC_VECTTAB(VECTTAB) (((VECTTAB) == NVIC_VectTab_RAM) || \
89+
((VECTTAB) == NVIC_VectTab_FLASH))
90+
/**
91+
* @}
92+
*/
93+
94+
/** @defgroup MISC_System_Low_Power
95+
* @{
96+
*/
97+
98+
#define NVIC_LP_SEVONPEND ((uint8_t)0x10)
99+
#define NVIC_LP_SLEEPDEEP ((uint8_t)0x04)
100+
#define NVIC_LP_SLEEPONEXIT ((uint8_t)0x02)
101+
#define IS_NVIC_LP(LP) (((LP) == NVIC_LP_SEVONPEND) || \
102+
((LP) == NVIC_LP_SLEEPDEEP) || \
103+
((LP) == NVIC_LP_SLEEPONEXIT))
104+
/**
105+
* @}
106+
*/
107+
108+
/** @defgroup MISC_Preemption_Priority_Group
109+
* @{
110+
*/
111+
112+
#define NVIC_PriorityGroup_0 ((uint32_t)0x700) /*!< 0 bits for pre-emption priority
113+
4 bits for subpriority */
114+
#define NVIC_PriorityGroup_1 ((uint32_t)0x600) /*!< 1 bits for pre-emption priority
115+
3 bits for subpriority */
116+
#define NVIC_PriorityGroup_2 ((uint32_t)0x500) /*!< 2 bits for pre-emption priority
117+
2 bits for subpriority */
118+
#define NVIC_PriorityGroup_3 ((uint32_t)0x400) /*!< 3 bits for pre-emption priority
119+
1 bits for subpriority */
120+
#define NVIC_PriorityGroup_4 ((uint32_t)0x300) /*!< 4 bits for pre-emption priority
121+
0 bits for subpriority */
122+
123+
#define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PriorityGroup_0) || \
124+
((GROUP) == NVIC_PriorityGroup_1) || \
125+
((GROUP) == NVIC_PriorityGroup_2) || \
126+
((GROUP) == NVIC_PriorityGroup_3) || \
127+
((GROUP) == NVIC_PriorityGroup_4))
128+
129+
#define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
130+
131+
#define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
132+
133+
#define IS_NVIC_OFFSET(OFFSET) ((OFFSET) < 0x000FFFFF)
134+
135+
/**
136+
* @}
137+
*/
138+
139+
/** @defgroup MISC_SysTick_clock_source
140+
* @{
141+
*/
142+
143+
#define SysTick_CLKSource_HCLK_Div8 ((uint32_t)0xFFFFFFFB)
144+
#define SysTick_CLKSource_HCLK ((uint32_t)0x00000004)
145+
#define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SysTick_CLKSource_HCLK) || \
146+
((SOURCE) == SysTick_CLKSource_HCLK_Div8))
147+
/**
148+
* @}
149+
*/
150+
151+
/**
152+
* @}
153+
*/
154+
155+
/* Exported macro ------------------------------------------------------------*/
156+
/* Exported functions --------------------------------------------------------*/
157+
158+
void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup);
159+
void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct);
160+
void NVIC_SetVectorTable(uint32_t NVIC_VectTab, uint32_t Offset);
161+
void NVIC_SystemLPConfig(uint8_t LowPowerMode, FunctionalState NewState);
162+
void SysTick_CLKSourceConfig(uint32_t SysTick_CLKSource);
163+
164+
#ifdef __cplusplus
165+
}
166+
#endif
167+
168+
#endif /* __MISC_H */
169+
170+
/**
171+
* @}
172+
*/
173+
174+
/**
175+
* @}
176+
*/
177+
178+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
2+
#ifndef _STM32F4_GPIO_AF_H_
3+
#define _STM32F4_GPIO_AF_H_
4+
5+
/**
6+
* @brief AF 0 selection
7+
*/
8+
#define GPIO_AF_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
9+
#define GPIO_AF_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
10+
#define GPIO_AF_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
11+
#define GPIO_AF_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
12+
#define GPIO_AF_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
13+
14+
/**
15+
* @brief AF 1 selection
16+
*/
17+
#define GPIO_AF_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
18+
#define GPIO_AF_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
19+
20+
/**
21+
* @brief AF 2 selection
22+
*/
23+
#define GPIO_AF_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
24+
#define GPIO_AF_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
25+
#define GPIO_AF_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
26+
27+
/**
28+
* @brief AF 3 selection
29+
*/
30+
#define GPIO_AF_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
31+
#define GPIO_AF_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
32+
#define GPIO_AF_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
33+
#define GPIO_AF_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
34+
35+
/**
36+
* @brief AF 4 selection
37+
*/
38+
#define GPIO_AF_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
39+
#define GPIO_AF_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
40+
#define GPIO_AF_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
41+
42+
/**
43+
* @brief AF 5 selection
44+
*/
45+
#define GPIO_AF_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
46+
#define GPIO_AF_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */
47+
48+
/**
49+
* @brief AF 6 selection
50+
*/
51+
#define GPIO_AF_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */
52+
53+
/**
54+
* @brief AF 7 selection
55+
*/
56+
#define GPIO_AF_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
57+
#define GPIO_AF_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
58+
#define GPIO_AF_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
59+
#define GPIO_AF_I2S3ext ((uint8_t)0x07) /* I2S3ext Alternate Function mapping */
60+
61+
/**
62+
* @brief AF 8 selection
63+
*/
64+
#define GPIO_AF_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
65+
#define GPIO_AF_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */
66+
#define GPIO_AF_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
67+
68+
/**
69+
* @brief AF 9 selection
70+
*/
71+
#define GPIO_AF_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
72+
#define GPIO_AF_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */
73+
#define GPIO_AF_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */
74+
#define GPIO_AF_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */
75+
#define GPIO_AF_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
76+
77+
/**
78+
* @brief AF 10 selection
79+
*/
80+
#define GPIO_AF_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */
81+
#define GPIO_AF_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */
82+
83+
/**
84+
* @brief AF 11 selection
85+
*/
86+
#define GPIO_AF_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */
87+
88+
/**
89+
* @brief AF 12 selection
90+
*/
91+
#define GPIO_AF_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */
92+
#define GPIO_AF_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */
93+
#define GPIO_AF_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */
94+
95+
/**
96+
* @brief AF 13 selection
97+
*/
98+
#define GPIO_AF_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */
99+
100+
/**
101+
* @brief AF 15 selection
102+
*/
103+
#define GPIO_AF_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
104+
105+
#endif
106+

0 commit comments

Comments
 (0)