X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=boards%2Fsam3x-ek%2Ftemplates%2Fsam3x-ek_empty%2Fcfg%2Fcfg_dac.h;fp=boards%2Fsam3x-ek%2Ftemplates%2Fsam3x-ek_empty%2Fcfg%2Fcfg_dac.h;h=1ae1e984834c9568f6b0b335a0a6f36f00c769ed;hb=0d00055c8a2fdb1cf747b9640082cd3c1b301f13;hp=0000000000000000000000000000000000000000;hpb=059709cc35dbe6cfd47c6b18e1177034a8fccbf6;p=bertos.git diff --git a/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_dac.h b/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_dac.h new file mode 100644 index 00000000..1ae1e984 --- /dev/null +++ b/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_dac.h @@ -0,0 +1,88 @@ +/** + * \file + * + * + * \brief Configuration file for DAC module. + * + * + * \author Daniele Basile + */ + +#ifndef CFG_DAC_H +#define CFG_DAC_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DAC_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DAC_LOG_FORMAT LOG_FMT_TERSE + +/** + * DAC Refresh Period = 1024*REFRESH/DACC Clock + * + * $WIZ$ type = "int" + * $WIZ$ supports = "sam3x" + * $WIZ$ min = 0 + * $WIZ$ max = 65536 + */ +#define CONFIG_DAC_REFRESH 16 + +/** + * DAC Startup Time Selection. + * see datasheet table. + * + * $WIZ$ type = "int" + * $WIZ$ supports = "sam3x" + * $WIZ$ min = 0 + * $WIZ$ max = 63 + */ +#define CONFIG_DAC_STARTUP 0 + +/** + * DAC Trigger Selection. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "sam3x_dac_tc" + * $WIZ$ supports = "sam3x" + */ +#define CONFIG_DAC_TIMER DACC_TRGSEL_TIO_CH0 + +#endif /* CFG_DAC_H */