Skip to content

Commit

Permalink
[doc] fix audac & auadc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sakumisue committed Jul 4, 2023
1 parent 088c4a3 commit 139589f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 23 deletions.
48 changes: 32 additions & 16 deletions drivers/lhal/include/bflb_auadc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@

#include "bflb_core.h"

/**
* @defgroup AUADC_SAMPLING_RATE auadc sampling rate
*/
/** @addtogroup LHAL
* @{
*/

/** @addtogroup AUADC
* @{
*/

/** @defgroup AUADC_SAMPLING_RATE auadc sampling rate definition
* @{
*/
#define AUADC_SAMPLING_RATE_8K 0 /* audio mode */
#define AUADC_SAMPLING_RATE_16K 1 /* audio mode */
#define AUADC_SAMPLING_RATE_24K 2 /* audio mode, same as 22.02K, adjust the AUPLL clock */
Expand All @@ -18,18 +26,18 @@
* @}
*/

/**
* @defgroup AUADC_INPUT_MODE auadc input mode
*/
/** @defgroup AUADC_INPUT_MODE auadc input mode definition
* @{
*/
#define AUADC_INPUT_MODE_ADC 0 /* Analog ADC */
#define AUADC_INPUT_MODE_PDM_L 1 /* PDM left channel */
#define AUADC_INPUT_MODE_PDM_R 2 /* PDM right channel */
/**
* @}
*/

/**
* @defgroup AUADC_DATA_FORMAT auadc data format
/** @defgroup AUADC_DATA_FORMAT auadc data format definition
* @{
*/
#define AUADC_DATA_FORMAT_16BIT 3
#define AUADC_DATA_FORMAT_20BIT 2
Expand All @@ -39,8 +47,8 @@
* @}
*/

/**
* @brief AUADC_ADC_ANALOG_CH auadc adc input ch
/** @defgroup AUADC_ADC_ANALOG_CH auadc adc input ch definition
* @{
*/
#define AUADC_ADC_ANALOG_CH_0 0
#define AUADC_ADC_ANALOG_CH_1 1
Expand All @@ -54,8 +62,8 @@
* @}
*/

/**
* @brief AUADC_ADC_MEASURE_RATE auadc adc Sampling rate in measurement mode, @ AUADC_SAMPLING_RATE_MEASURE_256K
/** @defgroup AUADC_ADC_MEASURE_RATE auadc adc sampling rate definition
* @{
*/

#define AUADC_ADC_MEASURE_RATE_SPS_2_5 0
Expand All @@ -76,17 +84,17 @@
* @}
*/

/**
* @brief AUADC_ADC_MODE auadc adc mode
/** @defgroup AUADC_ADC_MODE auadc adc mode definition
* @{
*/
#define AUADC_ADC_MODE_AUDIO 0
#define AUADC_ADC_MODE_MEASURE 1
/**
* @}
*/

/**
* @brief AUADC_ADC_PGA_MODE auadc adc mode, Ac or DC, differential or single
/** @defgroup AUADC_ADC_PGA_MODE auadc adc pga mode definition
* @{
*/
#define AUADC_ADC_PGA_MODE_AC_DIFFER 0
#define AUADC_ADC_PGA_MODE_AC_SINGLE 1
Expand Down Expand Up @@ -187,4 +195,12 @@ int bflb_auadc_feature_control(struct bflb_device_s *dev, int cmd, size_t arg);
}
#endif

/**
* @}
*/

/**
* @}
*/

#endif
39 changes: 32 additions & 7 deletions drivers/lhal/include/bflb_audac.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@

#include "bflb_core.h"

/** @addtogroup LHAL
* @{
*/

/** @addtogroup AUDAC
* @{
*/

/**
* @defgroup AUDAC_SAMPLING_RATE audac sampling rate
* @defgroup AUDAC_SAMPLING_RATE audac sampling rate definition
* @{
*/
#define AUDAC_SAMPLING_RATE_8K 0
#define AUDAC_SAMPLING_RATE_16K 1
Expand All @@ -18,7 +27,8 @@
*/

/**
* @defgroup AUDAC_OUTPUT_MODE audac output mode
* @defgroup AUDAC_OUTPUT_MODE audac output mode definition
* @{
*/
#define AUDAC_OUTPUT_MODE_PWM 0
#define AUDAC_OUTPUT_MODE_GPDAC_CH_A 1
Expand All @@ -29,7 +39,8 @@
*/

/**
* @defgroup AUDAC_SOURCE_CHANNEL source channels num
* @defgroup AUDAC_SOURCE_CHANNEL audac channel mode definition
* @{
*/
#define AUDAC_SOURCE_CHANNEL_SINGLE 0x01
#define AUDAC_SOURCE_CHANNEL_DUAL 0x03
Expand All @@ -38,7 +49,9 @@
*/

/**
* @defgroup AUDAC_MIXER_MODE audac mixer mode, this parameter is valid only in AUDAC_SOURCE_CHANNEL_DUAL mode
* @defgroup AUDAC_MIXER_MODE audac mixer mode definition
* this parameter is valid only in AUDAC_SOURCE_CHANNEL_DUAL mode
* @{
*/
#define AUDAC_MIXER_MODE_ONLY_L 0
#define AUDAC_MIXER_MODE_ONLY_R 1
Expand All @@ -49,7 +62,8 @@
*/

/**
* @defgroup AUDAC_DATA_FORMAT audac data format
* @defgroup AUDAC_DATA_FORMAT audac data format definition
* @{
*/
#define AUDAC_DATA_FORMAT_16BIT 3
#define AUDAC_DATA_FORMAT_20BIT 2
Expand All @@ -60,7 +74,8 @@
*/

/**
* @defgroup AUDAC_RAMP_RATE audac volume ramp rate
* @defgroup AUDAC_RAMP_RATE audac volume ramp rate definition
* @{
*/
#define AUDAC_RAMP_RATE_FS_2 0
#define AUDAC_RAMP_RATE_FS_4 1
Expand All @@ -78,7 +93,8 @@
*/

/**
* @defgroup AUDAC_VOLUME_UPDATE_MODE audac volume ramp rate
* @defgroup AUDAC_VOLUME_UPDATE_MODE audac volume update mode definition
* @{
*/
#define AUDAC_VOLUME_UPDATE_MODE_FORCE 0
#define AUDAC_VOLUME_UPDATE_MODE_RAMP 1
Expand All @@ -88,6 +104,7 @@
*/

/** @defgroup AUDAC_INTSTS audac interrupt status definition
* @{
* @{
*/
#define AUDAC_INTSTS_VOLUME_RAMP (1 << 0)
Expand Down Expand Up @@ -170,4 +187,12 @@ int bflb_audac_feature_control(struct bflb_device_s *dev, int cmd, size_t arg);
}
#endif

/**
* @}
*/

/**
* @}
*/

#endif

0 comments on commit 139589f

Please sign in to comment.