text: /*
   * Copyright (C) 2017-2020 Alibaba Group Holding Limited
   */
  
  /******************************************************************************
   * @file     drv/fft.h
   * @brief    Header File for FFT Driver
   * @version  V1.0
   * @date     11. Nov 2020
   * @model    fft
   ******************************************************************************/
  
  #ifndef _DRV_FFT_H_
  #define _DRV_FFT_H_
  
  #include <stdint.h>
  #include <stdbool.h>
  #include <stddef.h>
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  typedef enum {
      ///< 512-point FFT
      CSKY_MCA_FFT_LEN_512 = 0x1,
      ///< 256-point FFT
      CSKY_MCA_FFT_LEN_256 = 0x2,
      ///< 128-point FFT
      CSKY_MCA_FFT_LEN_128 = 0x4,
      ///< 64-point FFT
      CSKY_MCA_FFT_LEN_64 = 0x8,
      ///< 32-point FFT
      CSKY_MCA_FFT_LEN_32 = 0x10,
      ///< 16-point FFT
      CSKY_MCA_FFT_LEN_16 = 0x20,
  } csky_mca_fft_len_t;
  
  /* 8-bit fixed-point numeric type in user-defined format */
  typedef int8_t fxp8_t;
  
  /* 16-bit fixed-point numeric type in user-defined format */
  typedef int16_t fxp16_t;
  
  /* 24-bit fixed-point numeric type in user-defined format */
  typedef int32_t fxp24_t;
  
  /* 32-bit fixed-point numeric type in user-defined format */
  typedef int32_t fxp32_t;
  
  /* 64-bit fixed-point numeric type in user-defined format */
  typedef int64_t fxp64_t;
  
  /* 8-bit fixed-point numeric type in 1.0.7 format */
  typedef fxp8_t q7_t;
  
  /* 16-bit fixed-point numeric type in 1.0.15 format */
  typedef fxp16_t q15_t;
  
  /* 32-bit fixed-point numeric type in 1.15.16 format */
  typedef fxp32_t q16_t;
  
  void csky_mca_rfft_fxp32(csky_mca_fft_len_t fft_len, const fxp32_t *input, size_t input_size, fxp32_t *output);
  void csky_mca_cfft_fxp32(csky_mca_fft_len_t fft_len, const fxp32_t *input, fxp32_t *output);
  void csky_mca_rifft_fxp32(csky_mca_fft_len_t fft_len, const fxp32_t *input, fxp32_t *output);
  void csky_mca_cifft_fxp32(csky_mca_fft_len_t fft_len, const fxp32_t *input, fxp32_t *output);
  void csky_mca_power_spectrum_fxp32(csky_mca_fft_len_t fft_len, const fxp32_t *input, size_t input_size, fxp64_t *output);
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* _DRV_FFT_H_ */
  