-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiscover_board.h
60 lines (46 loc) · 1.94 KB
/
discover_board.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
******************************************************************************
* @file discover_board.h
* @author Microcontroller Division
* @version V1.0.2
* @date September-2011
* @brief Input/Output defines
******************************************************************************
* @copy
*
* 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.
*
* <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __DISCOVER_BOARD_H
#define __DISCOVER_BOARD_H
/* Includes ------------------------------------------------------------------*/
#include "stm32l1xx.h"
#define bool _Bool
#define FALSE 0
#define TRUE !FALSE
/* MACROs for SET, RESET or TOGGLE Output port */
#define GPIO_HIGH(a,b) a->BSRRL = b
#define GPIO_LOW(a,b) a->BSRRH = b
#define GPIO_TOGGLE(a,b) a->ODR ^= b
#define USERBUTTON_GPIO_PORT GPIOA
#define USERBUTTON_GPIO_PIN GPIO_Pin_0
#define USERBUTTON_GPIO_CLK RCC_AHBPeriph_GPIOA
#define LD_GPIO_PORT GPIOB
#define LD_GREEN_GPIO_PIN GPIO_Pin_7
#define LD_BLUE_GPIO_PIN GPIO_Pin_6
#define LD_GPIO_PORT_CLK RCC_AHBPeriph_GPIOB
#define CTN_GPIO_PORT GPIOC
#define CTN_CNTEN_GPIO_PIN GPIO_Pin_13
#define CTN_GPIO_CLK RCC_AHBPeriph_GPIOC
#define WAKEUP_GPIO_PORT GPIOA
#define IDD_MEASURE_PORT GPIOA
#define IDD_MEASURE GPIO_Pin_4
#endif
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/