Changeset - 910a3533e103
[Not reviewed]
default
0 5 0
Ethan Zonca - 11 years ago 2014-03-30 00:06:55
ez@ethanzonca.com
Strip out random crap
5 files changed with 1 insertions and 309 deletions:
0 comments (0 inline, 0 general)
main.c
Show inline comments
 
/**
 
  ******************************************************************************
 
  * @file    main.c 
 
  * @author  MCD Application Team
 
  * @version V1.0.0
 
  * @date    29-July-2013
 
  * @brief   Main program body
 
  ******************************************************************************
 
  * @attention
 
  *
 
  * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
 
  *
 
  * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2
 
  *
 
  * 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.
 
  *
 
  ******************************************************************************
 
  */ 
 
 
/* Includes ------------------------------------------------------------------*/
 
#include "main.h"
 
#include "stm32l100c_discovery.h"
 
/** @addtogroup STM32L100C-Discovery_Demo
 
  * @{
 
  */
 
 
/* Private typedef -----------------------------------------------------------*/
 
/* Private define ------------------------------------------------------------*/
 
/* Private macro -------------------------------------------------------------*/
 
/* Private variables ---------------------------------------------------------*/
 
static __IO uint32_t TimingDelay;
 
uint8_t BlinkSpeed = 0;
 
 
/* Private function prototypes -----------------------------------------------*/
 
/* Private functions ---------------------------------------------------------*/
 
 
/**
 
  * @brief  Main program.
 
  * @param  None
 
@@ -160,9 +122,3 @@ void assert_failed(uint8_t* file, uint32
 
}
 
#endif
 
 
/**
 
  * @}
 
  */
 
 
 
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
main.h
Show inline comments
 
/**
 
  ******************************************************************************
 
  * @file    main.h 
 
  * @author  MCD Application Team
 
  * @version V1.0.0
 
  * @date    29-July-2013
 
  * @brief   Header for main.c module
 
  ******************************************************************************
 
  * @attention
 
  *
 
  * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
 
  *
 
  * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2
 
  *
 
  * 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.
 
  *
 
  ******************************************************************************
 
  */ 
 
  
 
/* Define to prevent recursive inclusion -------------------------------------*/
 
#ifndef __MAIN_H
 
#define __MAIN_H
 
 
/* Includes ------------------------------------------------------------------*/
 
#include "stm32l1xx.h"
 
#include "stm32l100c_discovery.h"
 
/* Exported types ------------------------------------------------------------*/
 
/* Private define ------------------------------------------------------------*/
 
/* Exported constants --------------------------------------------------------*/
 
/* Exported macro ------------------------------------------------------------*/
 
/* Exported functions ------------------------------------------------------- */
 
 
void TimingDelay_Decrement(void);
 
void Delay(__IO uint32_t nTime);
 
 
#endif /* __MAIN_H */
 
 
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
stm32l100c_discovery.c
Show inline comments
 
/**
 
  ******************************************************************************
 
  * @file    stm32l100c_discovery.c
 
  * @author  MCD Application Team
 
  * @version V1.0.0
 
  * @date    29-July-2013
 
  * @brief   This file provides set of firmware functions to manage Leds and
 
  *          push-button available on STM32L100C-Discovery Kit from STMicroelectronics.
 
  ******************************************************************************
 
  * @attention
 
  *
 
  * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
 
  *
 
  * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2
 
  *
 
  * 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.
 
  *
 
  ******************************************************************************
 
  */
 
  
 
/* Includes ------------------------------------------------------------------*/
 
#include "stm32l100c_discovery.h"
 
 
/** @addtogroup Utilities
 
  * @{
 
  */ 
 
 
/** @addtogroup STM32L100C_DISCOVERY
 
  * @{
 
  */ 
 
    
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL 
 
  * @brief This file provides firmware functions to manage Leds and push-buttons, 
 
  *        available on STM32L100C_DISCOVERY evaluation board from STMicroelectronics.
 
  * @{
 
  */ 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Private_TypesDefinitions
 
  * @{
 
  */ 
 
/**
 
  * @}
 
  */ 
 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Private_Defines
 
  * @{
 
  */ 
 
/**
 
  * @}
 
  */ 
 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Private_Macros
 
  * @{
 
  */ 
 
/**
 
  * @}
 
  */ 
 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Private_Variables
 
  * @{
 
  */ 
 
GPIO_TypeDef* GPIO_PORT[LEDn] = {LED3_GPIO_PORT, LED4_GPIO_PORT};
 
const uint16_t GPIO_PIN[LEDn] = {LED3_PIN, LED4_PIN};
 
const uint32_t GPIO_CLK[LEDn] = {LED3_GPIO_CLK, LED4_GPIO_CLK};
 
@@ -89,23 +19,6 @@ const uint16_t BUTTON_PIN_SOURCE[BUTTONn
 
const uint16_t BUTTON_IRQn[BUTTONn] = {USER_BUTTON_EXTI_IRQn};
 
 
/**
 
  * @}
 
  */ 
 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Private_FunctionPrototypes
 
  * @{
 
  */ 
 
 
/**
 
  * @}
 
  */ 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Private_Functions
 
  * @{
 
  */ 
 
 
/**
 
  * @brief  Configures LED GPIO.
 
  * @param  Led: Specifies the Led to be configured. 
 
  *   This parameter can be one of following parameters:
 
@@ -238,20 +151,3 @@ uint32_t STM_EVAL_PBGetState(Button_Type
 
  return GPIO_ReadInputDataBit(BUTTON_PORT[Button], BUTTON_PIN[Button]);
 
}
 
 
/**
 
  * @}
 
  */ 
 
 
/**
 
  * @}
 
  */
 
 
/**
 
  * @}
 
  */
 
 
/**
 
  * @}
 
  */ 
 
    
 
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
stm32l100c_discovery.h
Show inline comments
 
/**
 
  ******************************************************************************
 
  * @file    stm32l100c_discovery.h
 
  * @author  MCD Application Team
 
  * @version V1.0.0
 
  * @date    29-July-2013
 
  * @brief   This file contains definitions for STM32L100C-Discovery's Leds, push-
 
  *          buttons hardware resources.
 
  ******************************************************************************
 
  * @attention
 
  *
 
  * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
 
  *
 
  * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2
 
  *
 
  * 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.
 
  *
 
  ******************************************************************************
 
  */
 
  
 
/* Define to prevent recursive inclusion -------------------------------------*/
 
#ifndef __STM32L100C_DISCOVERY_H
 
#define __STM32L100C_DISCOVERY_H
 
 
@@ -34,24 +5,8 @@
 
 extern "C" {
 
#endif
 
 
/* Includes ------------------------------------------------------------------*/
 
#include "stm32l1xx.h"
 
 
/** @addtogroup Utilities
 
  * @{
 
  */
 
 
/** @addtogroup STM32L100C_DISCOVERY
 
  * @{
 
  */
 
      
 
/** @addtogroup STM32L100C_DISCOVERY_LOW_LEVEL
 
  * @{
 
  */ 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Exported_Types
 
  * @{
 
  */
 
typedef enum 
 
{
 
  LED3 = 0,
 
@@ -69,17 +24,6 @@ typedef enum
 
  BUTTON_MODE_EXTI = 1
 
} ButtonMode_TypeDef;
 
  
 
/**
 
  * @}
 
  */ 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Exported_Constants
 
  * @{
 
  */ 
 
 
/** @addtogroup STM32L100C_DISCOVERY_LOW_LEVEL_LED
 
  * @{
 
  */
 
#define LEDn                             2
 
 
#define LED3_PIN                         GPIO_Pin_9
 
@@ -89,18 +33,9 @@ typedef enum
 
#define LED4_PIN                         GPIO_Pin_8
 
#define LED4_GPIO_PORT                   GPIOC
 
#define LED4_GPIO_CLK                    RCC_AHBPeriph_GPIOC
 
/**
 
  * @}
 
  */ 
 
 
/** @addtogroup SSTM32L100C_DISCOVERY_LOW_LEVEL_BUTTON
 
  * @{
 
  */  
 
#define BUTTONn                          1
 
 
/**
 
 * @brief USER push-button
 
 */
 
#define USER_BUTTON_PIN                GPIO_Pin_0
 
#define USER_BUTTON_GPIO_PORT          GPIOA
 
#define USER_BUTTON_GPIO_CLK           RCC_AHBPeriph_GPIOA
 
@@ -109,21 +44,6 @@ typedef enum
 
#define USER_BUTTON_EXTI_PIN_SOURCE    EXTI_PinSource0
 
#define USER_BUTTON_EXTI_IRQn          EXTI0_IRQn 
 
 
/**
 
  * @}
 
  */ 
 
  
 
    
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Exported_Macros
 
  * @{
 
  */  
 
/**
 
  * @}
 
  */ 
 
 
/** @defgroup STM32L100C_DISCOVERY_LOW_LEVEL_Exported_Functions
 
  * @{
 
  */
 
void STM_EVAL_LEDInit(Led_TypeDef Led);
 
void STM_EVAL_LEDOn(Led_TypeDef Led);
 
void STM_EVAL_LEDOff(Led_TypeDef Led);
 
@@ -131,25 +51,9 @@ void STM_EVAL_LEDToggle(Led_TypeDef Led)
 
void STM_EVAL_PBInit(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
 
uint32_t STM_EVAL_PBGetState(Button_TypeDef Button);
 
 
/**
 
  * @}
 
  */
 
  
 
#ifdef __cplusplus
 
}
 
#endif
 
 
#endif /* __STM32L100C_DISCOVERY_H */
 
/**
 
  * @}
 
  */ 
 
 
/**
 
  * @}
 
  */ 
 
 
/**
 
  * @}
 
  */
 
 
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
stm32l1xx_conf.h
Show inline comments
 
/**
 
  ******************************************************************************
 
  * @file    stm32l1xx_conf.h 
 
  * @author  MCD Application Team
 
  * @version V1.0.0
 
  * @date    29-July-2013
 
  * @brief   Library configuration file.
 
  ******************************************************************************
 
  * @attention
 
  *
 
  * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
 
  *
 
  * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2
 
  *
 
  * 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.
 
  *
 
  ******************************************************************************
 
  */
 
 
/* Define to prevent recursive inclusion -------------------------------------*/
 
#ifndef __STM32L1xx_CONF_H
 
#define __STM32L1xx_CONF_H
 
 
@@ -57,7 +29,6 @@
 
#include "stm32l1xx_wwdg.h"
 
#include "misc.h"  /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
 
 
/* Exported types ------------------------------------------------------------*/
 
/* Exported constants --------------------------------------------------------*/
 
/* Uncomment the line below to expanse the "assert_param" macro in the 
 
   Standard Peripheral Library drivers code */
 
@@ -82,4 +53,3 @@
 
 
#endif /* __STM32L1xx_CONF_H */
 
 
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
0 comments (0 inline, 0 general)