// Autogenerated C header file for Sound Spectrum
#ifndef _JACDAC_SPEC_SOUND_SPECTRUM_H
#define _JACDAC_SPEC_SOUND_SPECTRUM_H 1

#define JD_SERVICE_CLASS_SOUND_SPECTRUM  0x157abc1e

/**
 * Read-only bytes. The computed frequency data.
 */
#define JD_SOUND_SPECTRUM_REG_FREQUENCY_BINS JD_REG_READING

/**
 * Read-write bool (uint8_t). Turns on/off the micropohone.
 */
#define JD_SOUND_SPECTRUM_REG_ENABLED JD_REG_INTENSITY

/**
 * Read-write uint8_t. The power of 2 used as the size of the FFT to be used to determine the frequency domain.
 */
#define JD_SOUND_SPECTRUM_REG_FFT_POW2_SIZE 0x80

/**
 * Read-write dB int16_t. The minimum power value in the scaling range for the FFT analysis data
 */
#define JD_SOUND_SPECTRUM_REG_MIN_DECIBELS 0x81

/**
 * Read-write dB int16_t. The maximum power value in the scaling range for the FFT analysis data
 */
#define JD_SOUND_SPECTRUM_REG_MAX_DECIBELS 0x82

/**
 * Read-write ratio u0.8 (uint8_t). The averaging constant with the last analysis frame.
 * If `0` is set, there is no averaging done, whereas a value of `1` means "overlap the previous and current buffer quite a lot while computing the value".
 */
#define JD_SOUND_SPECTRUM_REG_SMOOTHING_TIME_CONSTANT 0x83

#endif
