9.1.3.2 Workflow
- Get the default configuration and initialize the module:
structac_config module_cfg;ac_get_config_defaults(&module_cfg);ac_init(&ac_device, ACIFC, &module_cfg); - Enable the module:
ac_enable(&ac_device); - Get the default configuration to initialize channel 0:
#define EXAMPLE_AC_CHANNEL 0structac_ch_config ch_cfg;ac_ch_get_config_defaults(&ch_cfg);ch_cfg.always_on =true;ch_cfg.fast_mode =true;ac_ch_set_config(&ac_device, EXAMPLE_AC_CHANNEL, &ch_cfg); - Start a single comparison:
ac_user_trigger_single_comparison(&ac_device); - Check if the comparison has completed:
while(!ac_is_comparison_done(&ac_device));
