aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/include/hal.h1
-rw-r--r--os/hal/src/dac.c4
-rw-r--r--os/hal/templates/dac_lld.h2
-rw-r--r--os/hal/templates/halconf.h7
4 files changed, 11 insertions, 3 deletions
diff --git a/os/hal/include/hal.h b/os/hal/include/hal.h
index 8bf648a8c..ceff2e0a9 100644
--- a/os/hal/include/hal.h
+++ b/os/hal/include/hal.h
@@ -47,6 +47,7 @@
#include "pal.h"
#include "adc.h"
#include "can.h"
+#include "dac.h"
#include "ext.h"
#include "gpt.h"
#include "i2c.h"
diff --git a/os/hal/src/dac.c b/os/hal/src/dac.c
index a4cb5aa10..3ab09f27c 100644
--- a/os/hal/src/dac.c
+++ b/os/hal/src/dac.c
@@ -215,7 +215,7 @@ void dacStopConversion(DACDriver *dacp) {
(dacp->state == DAC_ACTIVE),
"dacStopConversion(), #1", "invalid state");
if (dacp->state != DAC_READY) {
- adc_lld_stop_conversion(dacp);
+ dac_lld_stop_conversion(dacp);
dacp->grpp = NULL;
dacp->state = DAC_READY;
_dac_reset_s(dacp);
@@ -243,7 +243,7 @@ void dacStopConversionI(DACDriver *dacp) {
"dacStopConversionI(), #1", "invalid state");
if (dacp->state != DAC_READY) {
- adc_lld_stop_conversion(dacp);
+ dac_lld_stop_conversion(dacp);
dacp->grpp = NULL;
dacp->state = DAC_READY;
_dac_reset_i(dacp);
diff --git a/os/hal/templates/dac_lld.h b/os/hal/templates/dac_lld.h
index ab2c3494a..c9cb13fc6 100644
--- a/os/hal/templates/dac_lld.h
+++ b/os/hal/templates/dac_lld.h
@@ -154,7 +154,7 @@ struct DACDriver {
/**
* @brief Current samples buffer pointer or @p NULL.
*/
- dacsample_t *samples;
+ const dacsample_t *samples;
/**
* @brief Current samples buffer depth or @p 0.
*/
diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h
index d61f89d56..f879c03b3 100644
--- a/os/hal/templates/halconf.h
+++ b/os/hal/templates/halconf.h
@@ -62,6 +62,13 @@
#endif
/**
+ * @brief Enables the DAC subsystem.
+ */
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
+#endif
+
+/**
* @brief Enables the EXT subsystem.
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)