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().
#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 indicate_fault_behavior(), main(), nlme_rx_enable_confirm(), per_mode_initiator_task(), run_abdac_interrupt_test(), run_ac_test(), run_adcife_itimer_trig_test(), run_adcife_multichannel_test(), run_adcife_wm_test(), run_alarm_test(), run_backup_test(), run_cbc_mode_test(), run_cfb128_mode_test(), run_ctr_mode_test(), run_ecb_mode_test(), run_ecb_mode_test_pdca(), run_eic_test(), run_events_ast_test(), run_events_software_test(), run_freqm_test(), run_gpio_int_test(), run_lcdca_automated_scrolling_test(), run_lcdca_automated_sequential_test(), run_lcdca_autonomous_test(), run_lcdca_blink_test(), run_ofb_mode_test(), run_parc_callback_test(), run_parc_polled_test(), run_periodic_test(), run_picouart_test(), run_ret_test(), run_sleep_0_test(), run_sleep_1_test(), run_sleep_2_test(), run_sleep_3_test(), run_test_downstream(), run_test_downstream_disconnection(), run_wait_test(), test_backup_mode(), test_retention_mode(), test_wait_mode(), usr_mcps_data_conf(), vendor_app_alive_req(), wait_for_pushbutton(), and wait_for_switches().
#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(), PHY_RandomReq(), PhyReset(), qt_hardware_reset(), qt_read_regs(), qt_write_regs(), run_gloc_4inputs_xor_test(), run_iis_test(), sal_aes_wrrd(), ssd1306_hard_reset(), ssd1306_write_command(), ssd1306_write_data(), trx_aes_wrrd(), and trx_sram_read().
#define F_CPU sysclk_get_cpu_hz() |
MCU Clock Frequency (Hertz)