@@ -43,7 +43,7 @@ void pin_mode(PinName pin, PinMode mode)
4343 uint32_t pin_index = NU_PINNAME_TO_PIN (pin );
4444 uint32_t port_index = NU_PINNAME_TO_PORT (pin );
4545 GPIO_T * gpio_base = NU_PORT_BASE (port_index );
46-
46+
4747 uint32_t mode_intern = GPIO_MODE_INPUT ;
4848
4949 switch (mode ) {
@@ -81,38 +81,23 @@ void pin_mode(PinName pin, PinMode mode)
8181 */
8282}
8383
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-
9984#if defined(__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3U )
10085
10186static void pin_function_impl (int32_t pin , int32_t data , bool nonsecure_caller )
10287{
10388 MBED_ASSERT (pin != (PinName )NC );
10489 uint32_t pin_index = NU_PINNAME_TO_PIN (pin );
10590 uint32_t port_index = NU_PINNAME_TO_PORT (pin );
106-
91+
10792 /* Guard access to secure GPIO from non-secure domain */
108- if (nonsecure_caller &&
93+ if (nonsecure_caller &&
10994 (! (SCU_INIT_IONSSET_VAL & (1 << (port_index + 0 ))))) {
11095 error ("Non-secure domain tries to control secure or undefined GPIO." );
11196 }
11297
11398 __IO uint32_t * GPx_MFPx = ((__IO uint32_t * ) & SYS -> GPA_MFPL ) + port_index * 2 + (pin_index / 8 );
11499 uint32_t MFP_Msk = NU_MFP_MSK (pin_index );
115-
100+
116101 // E.g.: SYS->GPA_MFPL = (SYS->GPA_MFPL & (~SYS_GPA_MFPL_PA0MFP_Msk) ) | SYS_GPA_MFPL_PA0MFP_SC0_CD ;
117102 * GPx_MFPx = (* GPx_MFPx & (~MFP_Msk )) | data ;
118103}
0 commit comments