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 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().
#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 bmp_eoc_wait(), bmp_get_ut(), COMPILER_PACK_SET(), draw_formatted_data(), extended_delay_ms(), hmc5883l_calibrate(), hmc5883l_selftest(), hx8347a_controller_init_registers(), hx8347a_exit_standby(), hx8347a_reset_display(), ili9341_exit_standby(), ili9341_reset_display(), imu3000_set_state(), ISR(), itg3200_set_state(), kxtf9_init(), kxtf9_set_state(), main(), mxt_init(), prompt_user(), sensor_platform_init(), test_fail_indication(), usr_mcps_data_conf(), vendor_app_alive_req(), and wait_for_switches().
#define delay_s | ( | delay | ) | ((delay) ? cpu_delay_ms(1000 * delay, F_CPU) : cpu_delay_us(1, F_CPU)) |
Delay in seconds.
delay | Delay in seconds |
#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(), dac_calibrate_gain(), dac_calibrate_offset(), PHY_RandomReq(), PhyReset(), qt_hardware_reset(), qt_read_regs(), qt_write_regs(), ssd1306_hard_reset(), ssd1306_write_command(), ssd1306_write_data(), st7565r_hard_reset(), trx_aes_wrrd(), trx_sram_read(), and vbat_init().