|
Defines | |
| #define | abort() do { } while (ASSERT_ENABLED) |
| Abort execution of the program. | |
| #define | assert(condition) |
| Assert that condition is true at run time. | |
| #define | unhandled_case(value) |
| Assert that the case value will never need to be handled. | |
| #define | build_assert(condition) |
| Assert that condition is true at build time. | |
This module provides support for run-time and build-time assertions, to help testing and debugging.
| #define abort | ( | ) | do { } while (ASSERT_ENABLED) |
| #define assert | ( | condition | ) |
Assert that condition is true at run time.
If condition is false, output a diagnostic message and hang.
If CONFIG_ASSERT is not set, this macro does nothing.
Definition at line 89 of file assert.h.
Referenced by at45_cmd_buffer_1_main_memory_program_with_erase(), at45_cmd_buffer_1_write(), at45_cmd_cont_array_read(), at45_cmd_main_memory_to_buffer_1_transfer(), at45_read_rsp(), at45_write_cmd(), at90usb_ep0_tx_complete(), at90usb_ep0_tx_flush(), at90usb_ep_alloc(), at90usb_udc_configure_ep(), at90usb_udc_ep0_worker(), at90usb_udc_ep_flush(), at90usb_udc_submit_in_queue(), at90usb_udc_submit_out_queue(), blk_req_get_blocks_xfered(), blk_req_get_bytes_xfered(), blkdev_set_block_size(), block_alloc_request(), block_free_request(), block_prepare_req(), block_submit_buf_list(), block_submit_req(), buffer_resize(), dataflash_get_remaining_page_size(), dma_pool_init_coherent_physmem(), mainloop_run(), malloc(), mdelay(), msc_do_read(), msc_read_worker(), msc_write_worker(), slist_borrow_to_tail(), slist_move_to_head(), slist_peek_head_node(), slist_peek_next_node(), slist_peek_tail_node(), slist_pop_head_node(), softirq_poll(), spi_device_get_base(), spi_device_get_size(), spi_disable(), spi_enable(), spi_is_enabled(), spi_master_get_base(), spi_master_get_size(), sysclk_disable_module(), sysclk_enable_module(), udc_fifo_read_data(), udelay(), workqueue_init(), workqueue_is_empty(), and workqueue_pop_task().
| #define build_assert | ( | condition | ) |
do { \ if (!(condition)) \ build_assert_failed(); \ } while (0)
Assert that condition is true at build time.
If condition is false, the compilation will abort with an error message.
Definition at line 118 of file assert.h.
Referenced by udc_lib_standard_request().
| #define unhandled_case | ( | value | ) |
do { \ if (ASSERT_ENABLED) { \ dbg_printf_level(DEBUG_ASSERT, \ "%s:%d: Unhandled case value %d\n", \ __FILE__, __LINE__, (value)); \ abort(); \ } \ } while (0)
Assert that the case value will never need to be handled.
If the code expanded from this macro is ever reached, output a diagnostic message and hang.
If CONFIG_ASSERT is not set, this macro does nothing.
Definition at line 100 of file assert.h.
Referenced by gpio_get_value().
1.6.3