Skip to content

Commit 038a870

Browse files
bcostmadbridge
authored andcommitted
Update PinNames.h and remove PortNames.h after rebase with master
1 parent 0de4fef commit 038a870

File tree

2 files changed

+1
-98
lines changed

2 files changed

+1
-98
lines changed

targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L475VG_IOT/PinNames.h

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -31,52 +31,12 @@
3131
#define MBED_PINNAMES_H
3232

3333
#include "cmsis.h"
34+
#include "PinNamesTypes.h"
3435

3536
#ifdef __cplusplus
3637
extern "C" {
3738
#endif
3839

39-
#define STM_PIN_DATA(MODE, PUPD, AFNUM) ((int)(((MODE & 0x0F) << 0) |\
40-
((PUPD & 0x07) << 4) |\
41-
((AFNUM & 0x0F) << 7)))
42-
43-
#define STM_PIN_DATA_EXT(MODE, PUPD, AFNUM, CHANNEL, INVERTED) ((int)(((MODE & 0x0F) << 0) |\
44-
((PUPD & 0x07) << 4) |\
45-
((AFNUM & 0x0F) << 7) |\
46-
((CHANNEL & 0x1F) << 11) |\
47-
((INVERTED & 0x01) << 16)))
48-
49-
#define STM_PIN_MODE(X) (((X) >> 0) & 0x0F)
50-
#define STM_PIN_PUPD(X) (((X) >> 4) & 0x07)
51-
#define STM_PIN_AFNUM(X) (((X) >> 7) & 0x0F)
52-
#define STM_PIN_CHANNEL(X) (((X) >> 11) & 0x1F)
53-
#define STM_PIN_INVERTED(X) (((X) >> 16) & 0x01)
54-
55-
#define STM_MODE_INPUT (0)
56-
#define STM_MODE_OUTPUT_PP (1)
57-
#define STM_MODE_OUTPUT_OD (2)
58-
#define STM_MODE_AF_PP (3)
59-
#define STM_MODE_AF_OD (4)
60-
#define STM_MODE_ANALOG (5)
61-
#define STM_MODE_ANALOG_ADC_CONTROL (6)
62-
#define STM_MODE_IT_RISING (7)
63-
#define STM_MODE_IT_FALLING (8)
64-
#define STM_MODE_IT_RISING_FALLING (9)
65-
#define STM_MODE_EVT_RISING (10)
66-
#define STM_MODE_EVT_FALLING (11)
67-
#define STM_MODE_EVT_RISING_FALLING (12)
68-
#define STM_MODE_IT_EVT_RESET (13)
69-
70-
// High nibble = port number (0=A, 1=B, 2=C, 3=D, 4=E, 5=F, 6=G, 7=H)
71-
// Low nibble = pin number
72-
#define STM_PORT(X) (((uint32_t)(X) >> 4) & 0xF)
73-
#define STM_PIN(X) ((uint32_t)(X) & 0xF)
74-
75-
typedef enum {
76-
PIN_INPUT,
77-
PIN_OUTPUT
78-
} PinDirection;
79-
8040
typedef enum {
8141
PA_0 = 0x00,
8242
PA_1 = 0x01,
@@ -217,14 +177,6 @@ typedef enum {
217177
NC = (int)0xFFFFFFFF
218178
} PinName;
219179

220-
typedef enum {
221-
PullNone = 0,
222-
PullUp = 1,
223-
PullDown = 2,
224-
OpenDrain = 3,
225-
PullDefault = PullNone
226-
} PinMode;
227-
228180
#ifdef __cplusplus
229181
}
230182
#endif

targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L475VG_IOT/PortNames.h

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)