zoukankan      html  css  js  c++  java
  • STM32i学习之 assert_failed

    /*******************************************************************************

    固件函数库通过检查库函书的输入来实现运行时间错误侦测。

    通过使用宏assert_param来实现运行时间检测。

    所有要求输入参数的函数都使用这个宏。它可以检查输入

    参数是否在允许的范围之内。

    注: 运行时间检查,即宏assert_param应当只在库在Debug模式下

    编译时使用。建议在用户应用代码的开发和调试阶段使用

    运行时间检查,在最终的代码中去掉它们以改进代码尺寸

    和速度。 如果用户仍然希望在最终的代码中保留这项功能,

    可以在调用库函数前,重新使用宏assert_param来测试输入参数。*******************************************************************************/

    void assert_failed(u8* file, u32 line)

    {

    /* User can add his own implementation to report the file name and line number,

    ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* Infinite loop */

    while (1)

    {

    }

    }

    #endif

  • 相关阅读:
    化了妆的祝福 4
    桥牌感悟 2
    关于送礼
    东京disney sea流水账 1
    东京disney sea流水账 3
    晕倒的候任日本驻华大使
    一饮一啄
    就算神游 之二:行路 4
    关于送礼续
    桥牌感悟 3
  • 原文地址:https://www.cnblogs.com/hnrainll/p/1932497.html
Copyright © 2011-2022 走看看