Merge pull request #3389 from jeromecoutant/PR_ST_F2_ASSERT

STM32F2 : map ST HAL assert into MBED assert
pull/3451/head
Anna Bridge 2016-12-19 17:23:37 +00:00 committed by GitHub
commit 42389c1420
2 changed files with 4 additions and 5 deletions

View File

@ -382,9 +382,8 @@
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t* file, uint32_t line);
#include "mbed_assert.h"
#define assert_param(expr) MBED_ASSERT(expr)
#else
#define assert_param(expr) ((void)0)
#endif /* USE_FULL_ASSERT */

View File

@ -304,7 +304,7 @@ void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
mode = STM_MODE_IT_FALLING;
obj->event = EDGE_FALL;
} else { // NONE or RISE
mode = STM_MODE_IT_EVT_RESET;
mode = STM_MODE_INPUT;
obj->event = EDGE_NONE;
}
}
@ -313,7 +313,7 @@ void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
mode = STM_MODE_IT_RISING;
obj->event = EDGE_RISE;
} else { // NONE or FALL
mode = STM_MODE_IT_EVT_RESET;
mode = STM_MODE_INPUT;
obj->event = EDGE_NONE;
}
}