|
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 app_files_load_worker(), app_fonts_load_worker(), app_memgame_launch(), app_tank_launch(), 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(), 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(), calc_update_display(), dataflash_get_remaining_page_size(), gfx_copy_hugemem_pixels_to_screen(), gfx_copy_pixels_from_screen(), gfx_copy_pixels_to_screen(), gfx_copy_progmem_pixels_to_screen(), gfx_draw_bitmap(), gfx_draw_bitmap_tiled(), gfx_draw_char(), gfx_draw_progmem_string(), gfx_draw_string(), gfx_duplicate_pixel(), gfx_generic_get_pixmap(), gfx_generic_put_pixmap(), gfx_get_progmem_string_bounding_box(), gfx_get_string_bounding_box(), gfx_put_bitmap(), hugemem_read_block(), hugemem_write_block(), mainloop_run(), malloc(), mdelay(), membag_pool_init_physmem(), osc_enable(), pll_config_init(), pll_config_read(), pll_config_write(), pll_disable(), pll_wait_for_lock(), slide_launch_helper(), 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(), stream_buf_extract_char(), stream_buf_insert_char(), sysclk_init(), tc_timer_get_time(), tc_timer_init(), tc_timer_irq_handler(), tc_timer_set_alarm(), tc_timer_start(), tc_timer_stop(), tc_timer_write_resolution(), touch_compute_calibration_matrix(), touch_get_calibration_matrix(), touch_get_event(), touch_priv_adc_handler(), touch_priv_port_handler(), touch_set_calibration_matrix(), tsfs_init(), udelay(), win_process_command_event(), workqueue_init(), workqueue_is_empty(), workqueue_pop_task(), wtk_basic_frame_as_child(), wtk_basic_frame_create(), wtk_basic_frame_get_custom_data(), wtk_button_as_child(), wtk_button_create(), wtk_button_handler(), wtk_button_size_hint(), wtk_check_box_as_child(), wtk_check_box_create(), wtk_check_box_handler(), wtk_check_box_is_selected(), wtk_check_box_set(), wtk_check_box_size_hint(), wtk_check_box_toggle(), wtk_frame_as_child(), wtk_frame_as_parent(), wtk_frame_create(), wtk_frame_get_custom_data(), wtk_label_as_child(), wtk_label_change(), wtk_label_create(), wtk_label_handler(), wtk_label_size_hint(), wtk_progress_bar_as_child(), wtk_progress_bar_create(), wtk_progress_bar_get_value(), wtk_progress_bar_handler(), wtk_progress_bar_set_colors(), wtk_progress_bar_set_value(), wtk_radio_button_as_child(), wtk_radio_button_create(), wtk_radio_button_handler(), wtk_radio_button_is_selected(), wtk_radio_button_select(), wtk_radio_button_size_hint(), wtk_slider_as_child(), wtk_slider_create(), wtk_slider_get_value(), wtk_slider_handler(), wtk_slider_is_moving(), and wtk_slider_set_value().
| #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 sysclk_init().
| #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 app_fonts_frame_draw_handler(), gfx_draw_char(), osc_get_rate(), string_file_size(), sysclk_get_main_hz(), sysclk_get_per2_hz(), sysclk_init(), tank_loader(), tc_get_resolution(), tc_get_sysclk_id(), tc_get_sysclk_port(), tc_timer_init(), and tsfs_seek().
1.6.3