Example Code

Add the following to, for example, the main loop in your application C-file:
#define EXAMPLE_AC_CHANNEL         0
struct ac_dev_inst ac_device;
struct ac_config module_cfg;
ac_get_config_defaults(&module_cfg);
ac_init(&ac_device, ACIFC, &module_cfg);

ac_enable(&ac_device);

struct ac_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));