aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/exc.c45
-rw-r--r--libmaple/stm32f10x_conf.h132
-rw-r--r--libmaple/stm32f10x_it.c276
3 files changed, 45 insertions, 408 deletions
diff --git a/libmaple/exc.c b/libmaple/exc.c
new file mode 100644
index 0000000..ebf4b90
--- /dev/null
+++ b/libmaple/exc.c
@@ -0,0 +1,45 @@
+/* *****************************************************************************
+ * The MIT License
+ *
+ * Copyright (c) 2010 Perry Hung.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ * ****************************************************************************/
+
+void NMIException(void) {
+}
+void HardFaultException(void) {
+ while (1) {
+ }
+}
+
+void MemManageException(void) {
+ while (1) {
+ }
+}
+
+void BusFaultException(void) {
+ while (1) {
+ }
+}
+
+void UsageFaultException(void) {
+ while (1) {
+ }
+}
diff --git a/libmaple/stm32f10x_conf.h b/libmaple/stm32f10x_conf.h
deleted file mode 100644
index ddd1833..0000000
--- a/libmaple/stm32f10x_conf.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
-* File Name : stm32f10x_conf.h
-* Author : MCD Application Team
-* Version : V2.0.2
-* Date : 07/11/2008
-* Description : Library configuration file.
-********************************************************************************
-* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-*******************************************************************************/
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F10x_CONF_H
-#define __STM32F10x_CONF_H
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x_type.h"
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Uncomment the line below to compile the library in DEBUG mode, this will expanse
- the "assert_param" macro in the firmware library code (see "Exported macro"
- section below) */
-/* #define DEBUG 1*/
-
-/* Comment the line below to disable the specific peripheral inclusion */
-/************************************* ADC ************************************/
-//#define _ADC
-//#define _ADC1
-//#define _ADC2
-//#define _ADC3
-//#define _BKP
-//#define _CAN
-//#define _CRC
-//#define _DAC
-//#define _DBGMCU
-//#define _DMA
-//#define _DMA1_Channel1
-//#define _DMA1_Channel2
-//#define _DMA1_Channel3
-//#define _DMA1_Channel4
-//#define _DMA1_Channel5
-//#define _DMA1_Channel6
-//#define _DMA1_Channel7
-//#define _DMA2_Channel1
-//#define _DMA2_Channel2
-//#define _DMA2_Channel3
-//#define _DMA2_Channel4
-//#define _DMA2_Channel5
-#define _EXTI
-#define _FLASH
-
-/* Uncomment the line below to enable FLASH program/erase/protections functions,
- otherwise only FLASH configuration (latency, prefetch, half cycle) functions
- are enabled */
-/* #define _FLASH_PROG */
-
-#if 0
-#define _FSMC
-#define _GPIO
-#define _GPIOA
-#define _GPIOB
-#define _GPIOC
-#define _GPIOD
-#define _GPIOE
-#define _GPIOF
-#define _GPIOG
-#define _I2C
-#define _I2C1
-#define _I2C2
-#define _IWDG
-#define _PWR
-#define _RTC
-#define _SDIO
-#define _SPI
-#define _SPI1
-#define _SPI2
-#define _SPI3
-#define _SysTick
-#define _TIM
-#define _TIM1
-#define _TIM2
-#define _TIM3
-#define _TIM4
-#define _TIM5
-#define _TIM6
-#define _TIM7
-#define _TIM8
-#define _USART
-#define _USART1
-#define _USART3
-#define _UART4
-#define _UART5
-#endif
-#define _USART2
-#define _NVIC
-#define _RCC
-#define _AFIO
-
-/************************************* WWDG ***********************************/
-#define _WWDG
-
-/* In the following line adjust the value of External High Speed oscillator (HSE)
- used in your application */
-#define HSE_Value ((u32)8000000) /* Value of the External oscillator in Hz*/
-
-/* Exported macro ------------------------------------------------------------*/
-#ifdef DEBUG
-/*******************************************************************************
-* Macro Name : assert_param
-* Description : The assert_param macro is used for function's parameters check.
-* It is used only if the library is compiled in DEBUG mode.
-* Input : - expr: If expr is false, it calls assert_failed function
-* which reports the name of the source file and the source
-* line number of the call that failed.
-* If expr is true, it returns no value.
-* Return : None
-*******************************************************************************/
- #define assert_param(expr) ((expr) ? (void)0 : assert_failed((u8 *)__FILE__, __LINE__))
-/* Exported functions ------------------------------------------------------- */
- void assert_failed(u8* file, u32 line);
-#else
- #define assert_param(expr) ((void)0)
-#endif /* DEBUG */
-
-#endif /* __STM32F10x_CONF_H */
-
-/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
diff --git a/libmaple/stm32f10x_it.c b/libmaple/stm32f10x_it.c
deleted file mode 100644
index 191dbd1..0000000
--- a/libmaple/stm32f10x_it.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/* *****************************************************************************
- * The MIT License
- *
- * Copyright (c) 2010 Perry Hung.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- * ****************************************************************************/
-
-void NMIException(void) {
-}
-void HardFaultException(void) {
- while (1) {
- }
-}
-
-void MemManageException(void) {
- while (1) {
- }
-}
-
-void BusFaultException(void) {
- while (1) {
- }
-}
-
-void UsageFaultException(void) {
- while (1) {
- }
-}
-
-#if 0
-void DebugMonitor(void) {
-}
-
-void SVCHandler(void) {
-}
-
-void PendSVC(void) {
-}
-
-void WWDG_IRQHandler(void) {
-}
-
-void PVD_IRQHandler(void) {
-}
-
-void TAMPER_IRQHandler(void) {
-}
-
-void RTC_IRQHandler(void) {
-}
-
-void FLASH_IRQHandler(void) {
-}
-
-void RCC_IRQHandler(void) {
-}
-
-void DMA1_Channel1_IRQHandler(void) {
-}
-
-void DMA1_Channel2_IRQHandler(void) {
-}
-
-void DMA1_Channel3_IRQHandler(void) {
-}
-
-void DMA1_Channel4_IRQHandler(void) {
-}
-
-void DMA1_Channel5_IRQHandler(void) {
-}
-
-void DMA1_Channel6_IRQHandler(void) {
-}
-
-void DMA1_Channel7_IRQHandler(void) {
-}
-
-void ADC1_2_IRQHandler(void) {
-}
-
-void USB_HP_CAN_TX_IRQHandler(void) {
-}
-
-void USB_LP_CAN_RX0_IRQHandler(void) {
-}
-
-void CAN_RX1_IRQHandler(void) {
-}
-
-void CAN_SCE_IRQHandler(void) {
-}
-
-void TIM1_BRK_IRQHandler(void) {
-}
-
-void TIM1_UP_IRQHandler(void) {
- while(1) {
- }
-}
-
-void TIM1_TRG_COM_IRQHandler(void) {
-}
-
-void TIM1_CC_IRQHandler(void) {
- while(1)
- ;
-}
-
-void TIM2_IRQHandler(void) {
-}
-
-void TIM3_IRQHandler(void) {
-}
-
-void TIM4_IRQHandler(void) {
-}
-
-void I2C1_EV_IRQHandler(void) {
-}
-
-void I2C1_ER_IRQHandler(void) {
-}
-
-void I2C2_EV_IRQHandler(void) {
-}
-
-void I2C2_ER_IRQHandler(void) {
-}
-
-void SPI1_IRQHandler(void) {
-}
-
-void SPI2_IRQHandler(void) {
-}
-
-void USART1_IRQHandler(void) {
-#if 0
- if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
- {
- /* Read one byte from the receive data register */
- RxBuffer[RxCounter++] = (USART_ReceiveData(USART1) & 0x7F);
-
- if(RxCounter == NbrOfDataToRead)
- {
- /* Disable the USART Receive interrupt */
- USART_ITConfig(USART1, USART_IT_RXNE, DISABLE);
- }
- }
-
- if(USART_GetITStatus(USART1, USART_IT_TXE) != RESET)
- {
- /* Write one byte to the transmit data register */
- USART_SendData(USART1, TxBuffer[TxCounter++]);
-
- if(TxCounter == NbrOfDataToTransfer)
- {
- /* Disable the USART1 Transmit interrupt */
- USART_ITConfig(USART1, USART_IT_TXE, DISABLE);
- }
- }
-#endif
-}
-
-void USART2_IRQHandler(void) {
-#if 0
- if(USART_GetITStatus(USART2, USART_IT_RXNE) != RESET)
- {
- /* Echo the character back */
- RxBuffer[0] = (USART_ReceiveData(USART2) & 0x7F);
- USART_SendData(USART2, RxBuffer[0]);
- // /* Read one byte from the receive data register */
- // RxBuffer[RxCounter++] = (USART_ReceiveData(USART2) & 0x7F);
-
- // if(RxCounter == NbrOfDataToRead)
- // {
- // /* Disable the USART Receive interrupt */
- // USART_ITConfig(USART2, USART_IT_RXNE, DISABLE);
- // }
- }
-
-#endif
-
-#if 0
- if(USART_GetITStatus(USART2, USART_IT_TXE) != RESET)
- {
- /* Write one byte to the transmit data register */
- USART_SendData(USART2, 'Y');
- TxCounter++;
-// USART_SendData(USART2, TxBuffer[TxCounter++]);
-
- if(TxCounter == NbrOfDataToTransfer) {
- /* Disable the USART1 Transmit interrupt */
- USART_ITConfig(USART2, USART_IT_TXE, DISABLE);
- }
- }
-#endif
-}
-
-void USART3_IRQHandler(void) {
-}
-
-void RTCAlarm_IRQHandler(void) {
-}
-
-void USBWakeUp_IRQHandler(void) {
-}
-
-void TIM8_BRK_IRQHandler(void) {
-}
-
-void TIM8_UP_IRQHandler(void) {
-}
-
-void TIM8_TRG_COM_IRQHandler(void) {
-}
-
-void TIM8_CC_IRQHandler(void) {
-}
-
-void ADC3_IRQHandler(void) {
-}
-
-void FSMC_IRQHandler(void) {
-}
-
-void SDIO_IRQHandler(void) {
-}
-
-void TIM5_IRQHandler(void) {
-}
-
-void SPI3_IRQHandler(void) {
-}
-
-void UART4_IRQHandler(void) {
-}
-
-void UART5_IRQHandler(void) {
-}
-
-void TIM6_IRQHandler(void) {
-}
-
-void TIM7_IRQHandler(void) {
-}
-
-void DMA2_Channel1_IRQHandler(void) {
-}
-
-void DMA2_Channel2_IRQHandler(void) {
-}
-
-void DMA2_Channel3_IRQHandler(void) {
-}
-
-void DMA2_Channel4_5_IRQHandler(void) {
-}
-#endif