mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 18:27:15 +02:00
Update IDF to 1e0710f
This commit is contained in:
@ -28,13 +28,31 @@ typedef enum {
|
||||
DAC_CHANNEL_MAX,
|
||||
} dac_channel_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Set DAC output voltage.
|
||||
*
|
||||
* @note Function has been deprecated, please use dac_output_voltage instead.
|
||||
* This name will be removed in a future release.
|
||||
* The difference is that before calling dac_output_voltage, we need to initialize the dac pad by dac_output_enable
|
||||
*
|
||||
*
|
||||
* @param channel DAC channel
|
||||
* @param dac_value DAC output value
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK success
|
||||
* - ESP_ERR_INVALID_ARG Parameter error
|
||||
*/
|
||||
esp_err_t dac_out_voltage(dac_channel_t channel, uint8_t dac_value) __attribute__ ((deprecated));
|
||||
|
||||
/**
|
||||
* @brief Set DAC output voltage.
|
||||
*
|
||||
* DAC output is 8-bit. Maximum (255) corresponds to VDD.
|
||||
*
|
||||
* @note When this function is called, function for the DAC
|
||||
* channel's GPIO pin is reconfigured for RTC DAC function.
|
||||
* @note Need to configure DAC pad before calling this function.
|
||||
* DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26
|
||||
*
|
||||
* @param channel DAC channel
|
||||
* @param dac_value DAC output value
|
||||
@ -43,8 +61,35 @@ typedef enum {
|
||||
* - ESP_OK success
|
||||
* - ESP_ERR_INVALID_ARG Parameter error
|
||||
*/
|
||||
esp_err_t dac_out_voltage(dac_channel_t channel, uint8_t dac_value);
|
||||
esp_err_t dac_output_voltage(dac_channel_t channel, uint8_t dac_value);
|
||||
|
||||
/**
|
||||
* @brief DAC pad output enable
|
||||
*
|
||||
* @param channel DAC channel
|
||||
* @note DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26
|
||||
* I2S left channel will be mapped to DAC channel 2
|
||||
* I2S right channel will be mapped to DAC channel 1
|
||||
*/
|
||||
esp_err_t dac_output_enable(dac_channel_t channel);
|
||||
|
||||
/**
|
||||
* @brief DAC pad output disable
|
||||
*
|
||||
* @param channel DAC channel
|
||||
* @note DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26
|
||||
*/
|
||||
esp_err_t dac_output_disable(dac_channel_t channel);
|
||||
|
||||
/**
|
||||
* @brief Enable DAC output data from I2S
|
||||
*/
|
||||
esp_err_t dac_i2s_enable();
|
||||
|
||||
/**
|
||||
* @brief Disable DAC output data from I2S
|
||||
*/
|
||||
esp_err_t dac_i2s_disable();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user