This module provides simple loop-based delay routines for those applications requiring a brief wait during execution.
Common API for UC3, XMEGA, and AVR MEGA.
Macros | |
#define | delay_init(fcpu_hz) |
Initialize the delay driver. More... | |
#define | delay_ms(delay) ((delay) ? cpu_delay_ms(delay, F_CPU) : cpu_delay_us(1, F_CPU)) |
Delay in milliseconds. More... | |
#define | delay_s(delay) ((delay) ? cpu_delay_ms(1000 * delay, F_CPU) : cpu_delay_us(1, F_CPU)) |
Delay in seconds. More... | |
#define | delay_us(delay) ((delay) ? cpu_delay_us(delay, F_CPU) : cpu_delay_us(1, F_CPU)) |
Delay in microseconds. More... | |
#define | F_CPU sysclk_get_cpu_hz() |
MCU Clock Frequency (Hertz) More... | |
#define delay_init | ( | fcpu_hz | ) |
Initialize the delay driver.
fcpu_hz | CPU frequency in Hz |
The functions in this module call sysclk_get_cpu_hz() function to obtain the system clock frequency.
Referenced by main(), and nm_bsp_init().
#define delay_ms | ( | delay | ) | ((delay) ? cpu_delay_ms(delay, F_CPU) : cpu_delay_us(1, F_CPU)) |
Delay in milliseconds.
delay | Delay in milliseconds |
Referenced by anp_custom_event(), ble_critical_alert(), ble_observer_custom_event(), capture_init(), display_sd_info(), erase_block(), getchar_timeout(), hid_service_dbreg(), hr_sensor_app_custom_event(), ili9341_exit_standby(), ili9341_reset_display(), iperf_tcp_task(), ksz8851snl_init(), main(), mxt_init(), nand_flash_raw_initialize(), nm_bsp_sleep(), os_m2m_wifi_connect(), os_m2m_wifi_enable_ap(), ov_reset(), ov_write_regs(), per_mode_initiator_task(), platform_send_sync(), platform_sleep(), retry_smtp_server(), serial_bridge_process_reconfigure(), and tip_app_custom_event().
#define delay_s | ( | delay | ) | ((delay) ? cpu_delay_ms(1000 * delay, F_CPU) : cpu_delay_us(1, F_CPU)) |
#define delay_us | ( | delay | ) | ((delay) ? cpu_delay_us(delay, F_CPU) : cpu_delay_us(1, F_CPU)) |
Delay in microseconds.
delay | Delay in microseconds |
Referenced by app_alert(), at24cxx_reset(), main(), nand_flash_raw_read_id(), nand_flash_raw_read_page(), PHY_RandomReq(), qt_hardware_reset(), qt_read_regs(), qt_write_regs(), sal_aes_wrrd(), ssd1306_hard_reset(), ssd1306_write_command(), and ssd1306_write_data().
#define F_CPU sysclk_get_cpu_hz() |
MCU Clock Frequency (Hertz)
Referenced by main().