@@ -43,7 +43,7 @@ void pin_mode(PinName pin, PinMode mode)
43
43
uint32_t pin_index = NU_PINNAME_TO_PIN (pin );
44
44
uint32_t port_index = NU_PINNAME_TO_PORT (pin );
45
45
GPIO_T * gpio_base = NU_PORT_BASE (port_index );
46
-
46
+
47
47
uint32_t mode_intern = GPIO_MODE_INPUT ;
48
48
49
49
switch (mode ) {
@@ -81,38 +81,23 @@ void pin_mode(PinName pin, PinMode mode)
81
81
*/
82
82
}
83
83
84
- /* List of peripherals excluded from testing */
85
- const PeripheralList * pinmap_restricted_peripherals ()
86
- {
87
- static const int perifs [] = {
88
- STDIO_UART // Dedicated to USB VCOM
89
- };
90
-
91
- static const PeripheralList peripheral_list = {
92
- sizeof (perifs ) / sizeof (perifs [0 ]),
93
- perifs
94
- };
95
-
96
- return & peripheral_list ;
97
- }
98
-
99
84
#if defined(__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3U )
100
85
101
86
static void pin_function_impl (int32_t pin , int32_t data , bool nonsecure_caller )
102
87
{
103
88
MBED_ASSERT (pin != (PinName )NC );
104
89
uint32_t pin_index = NU_PINNAME_TO_PIN (pin );
105
90
uint32_t port_index = NU_PINNAME_TO_PORT (pin );
106
-
91
+
107
92
/* Guard access to secure GPIO from non-secure domain */
108
- if (nonsecure_caller &&
93
+ if (nonsecure_caller &&
109
94
(! (SCU_INIT_IONSSET_VAL & (1 << (port_index + 0 ))))) {
110
95
error ("Non-secure domain tries to control secure or undefined GPIO." );
111
96
}
112
97
113
98
__IO uint32_t * GPx_MFPx = ((__IO uint32_t * ) & SYS -> GPA_MFPL ) + port_index * 2 + (pin_index / 8 );
114
99
uint32_t MFP_Msk = NU_MFP_MSK (pin_index );
115
-
100
+
116
101
// E.g.: SYS->GPA_MFPL = (SYS->GPA_MFPL & (~SYS_GPA_MFPL_PA0MFP_Msk) ) | SYS_GPA_MFPL_PA0MFP_SC0_CD ;
117
102
* GPx_MFPx = (* GPx_MFPx & (~MFP_Msk )) | data ;
118
103
}
0 commit comments