Skip to content

Commit 42389c1

Browse files
authored
Merge pull request #3389 from jeromecoutant/PR_ST_F2_ASSERT
STM32F2 : map ST HAL assert into MBED assert
2 parents 89190fd + 008a123 commit 42389c1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_conf.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,8 @@
382382
* If expr is true, it returns no value.
383383
* @retval None
384384
*/
385-
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
386-
/* Exported functions ------------------------------------------------------- */
387-
void assert_failed(uint8_t* file, uint32_t line);
385+
#include "mbed_assert.h"
386+
#define assert_param(expr) MBED_ASSERT(expr)
388387
#else
389388
#define assert_param(expr) ((void)0)
390389
#endif /* USE_FULL_ASSERT */

targets/TARGET_STM/TARGET_STM32F2/gpio_irq_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
304304
mode = STM_MODE_IT_FALLING;
305305
obj->event = EDGE_FALL;
306306
} else { // NONE or RISE
307-
mode = STM_MODE_IT_EVT_RESET;
307+
mode = STM_MODE_INPUT;
308308
obj->event = EDGE_NONE;
309309
}
310310
}
@@ -313,7 +313,7 @@ void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
313313
mode = STM_MODE_IT_RISING;
314314
obj->event = EDGE_RISE;
315315
} else { // NONE or FALL
316-
mode = STM_MODE_IT_EVT_RESET;
316+
mode = STM_MODE_INPUT;
317317
obj->event = EDGE_NONE;
318318
}
319319
}

0 commit comments

Comments
 (0)