mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
refactor(dac): remove adc read back in dac example, prepare for s31
This commit is contained in:
@@ -153,7 +153,7 @@ esp_err_t dac_continuous_disable(dac_continuous_handle_t handle);
|
||||
* - ESP_ERR_TIMEOUT Waiting for semaphore or message queue timeout
|
||||
* - ESP_OK Success to output the acyclic DAC data
|
||||
*/
|
||||
esp_err_t dac_continuous_write(dac_continuous_handle_t handle, uint8_t *buf, size_t buf_size, size_t *bytes_loaded, int timeout_ms);
|
||||
esp_err_t dac_continuous_write(dac_continuous_handle_t handle, const uint8_t *buf, size_t buf_size, size_t *bytes_loaded, int timeout_ms);
|
||||
|
||||
/**
|
||||
* @brief Write DAC continuous data cyclically
|
||||
@@ -176,7 +176,7 @@ esp_err_t dac_continuous_write(dac_continuous_handle_t handle, uint8_t *buf, siz
|
||||
* - ESP_ERR_INVALID_STATE The DAC continuous mode has not been enabled yet
|
||||
* - ESP_OK Success to output the cyclic DAC data
|
||||
*/
|
||||
esp_err_t dac_continuous_write_cyclically(dac_continuous_handle_t handle, uint8_t *buf, size_t buf_size, size_t *bytes_loaded);
|
||||
esp_err_t dac_continuous_write_cyclically(dac_continuous_handle_t handle, const uint8_t *buf, size_t buf_size, size_t *bytes_loaded);
|
||||
|
||||
/**
|
||||
* @brief Stop the cyclical conversion triggered by 'dac_continuous_write_cyclically'
|
||||
@@ -257,6 +257,14 @@ esp_err_t dac_continuous_write_asynchronously(dac_continuous_handle_t handle,
|
||||
size_t data_len,
|
||||
size_t *bytes_loaded);
|
||||
|
||||
/**
|
||||
* @brief Get the DAC code bit width of the continuous channel group
|
||||
*
|
||||
* @param[in] handle The DAC continuous channel handle
|
||||
* @return The DAC code bit width, 0 if the input parameter is invalid
|
||||
*/
|
||||
uint8_t dac_continuous_get_bitwidth(dac_continuous_handle_t handle);
|
||||
|
||||
#endif // SOC_DAC_SUPPORTED
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2019-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -91,6 +91,14 @@ esp_err_t dac_cosine_start(dac_cosine_handle_t handle);
|
||||
*/
|
||||
esp_err_t dac_cosine_stop(dac_cosine_handle_t handle);
|
||||
|
||||
/**
|
||||
* @brief Get the DAC code bit width of a cosine wave channel
|
||||
*
|
||||
* @param[in] handle The DAC cosine wave channel handle
|
||||
* @return The DAC code bit width, 0 if the input parameter is invalid
|
||||
*/
|
||||
uint8_t dac_cosine_get_bitwidth(dac_cosine_handle_t handle);
|
||||
|
||||
#endif // SOC_DAC_SUPPORTED
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2019-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -63,6 +63,14 @@ esp_err_t dac_oneshot_del_channel(dac_oneshot_handle_t handle);
|
||||
*/
|
||||
esp_err_t dac_oneshot_output_voltage(dac_oneshot_handle_t handle, uint8_t digi_value);
|
||||
|
||||
/**
|
||||
* @brief Get the DAC code bit width of a oneshot channel
|
||||
*
|
||||
* @param[in] handle The DAC oneshot channel handle
|
||||
* @return The DAC code bit width, 0 if the input parameter is invalid
|
||||
*/
|
||||
uint8_t dac_oneshot_get_bitwidth(dac_oneshot_handle_t handle);
|
||||
|
||||
#endif // SOC_DAC_SUPPORTED
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user