9.1.3.1 Example Code
Add the following to, for example, the main loop in your application C-file:
#define EXAMPLE_AC_CHANNEL 0
structac_dev_inst ac_device;
structac_config module_cfg;ac_get_config_defaults(&module_cfg);ac_init(&ac_device, ACIFC, &module_cfg);ac_enable(&ac_device);structac_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);
while(!ac_is_comparison_done(&ac_device));
