diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-05-02 20:26:17 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-05-02 20:26:17 +0000 |
commit | b2431579e414f837add230e540af226a73ddc8ab (patch) | |
tree | 7183539f8effe30b104a7543f313dc53bb181c1d /os/hal/ports/STM32/LLD/DACv1/dac_lld.c | |
parent | 0b7c0f050c5ad42a55fc3635d6ae44bda5bfe049 (diff) | |
download | ChibiOS-b2431579e414f837add230e540af226a73ddc8ab.tar.gz ChibiOS-b2431579e414f837add230e540af226a73ddc8ab.tar.bz2 ChibiOS-b2431579e414f837add230e540af226a73ddc8ab.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7938 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/DACv1/dac_lld.c')
-rw-r--r-- | os/hal/ports/STM32/LLD/DACv1/dac_lld.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/DACv1/dac_lld.c b/os/hal/ports/STM32/LLD/DACv1/dac_lld.c index 8afa4e505..99ed45ef2 100644 --- a/os/hal/ports/STM32/LLD/DACv1/dac_lld.c +++ b/os/hal/ports/STM32/LLD/DACv1/dac_lld.c @@ -81,7 +81,9 @@ DACDriver DACD4; /* Driver local variables. */
/*===========================================================================*/
-static const DACConfig default_config = {0};
+static const DACConfig default_config = {
+ datamode: DAC_DHRM_12BIT_RIGHT
+};
#if STM32_DAC_USE_DAC1_CH1 == TRUE
static const dacparams_t dma1_ch1_params = {
@@ -311,6 +313,24 @@ void dac_lld_stop(DACDriver *dacp) { }
/**
+ * @brief Outputs a value directly on a DAC channel.
+ *
+ * @param[in] dacp pointer to the @p DACDriver object
+ * @param[in] channel DAC channel number
+ * @param[in] sample value to be output
+ *
+ * @api
+ */
+void dac_lld_put_channel(DACDriver *dacp,
+ dacchannel_t channel,
+ dacsample_t sample) {
+
+ (void)dacp;
+ (void)channel;
+ (void)sample;
+}
+
+/**
* @brief Starts a DAC conversion.
* @details Starts an asynchronous conversion operation.
*
@@ -322,7 +342,7 @@ void dac_lld_start_conversion(DACDriver *dacp) { uint32_t cr, dmamode;
#if STM32_DAC_DUAL_MODE == FALSE
- switch (dacp->grpp->datamode) {
+ switch (dacp->config->datamode) {
/* Sets the DAC data register */
case DAC_DHRM_12BIT_RIGHT:
dmaStreamSetPeripheral(dacp->params->dma, &dacp->params->dac->DHR12R1 +
|