1 // Copyright (C) 2022 Beken Corporation 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 #include "hal_config.h" 18 #include <soc/soc.h> 19 #include <driver/fft_types.h> 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 bk_err_t fft_hal_status_get(fft_status_t *fft_status); 26 bk_err_t fft_hal_int_enable_status_get(fft_int_status *int_status); 27 bk_err_t fft_hal_fft_mode_set(uint32_t value); 28 bk_err_t fft_hal_fft_config_reset(uint32_t value); 29 bk_err_t fft_hal_fir_config_reset(uint32_t value); 30 bk_err_t fft_hal_ifft_en(uint32_t value); 31 bk_err_t fft_hal_fft_int_en(uint32_t value); 32 bk_err_t fft_hal_fft_en(uint32_t value); 33 bk_err_t fft_hal_fir_length_set(uint32_t value); 34 bk_err_t fft_hal_fir_mode_set(uint32_t value); 35 bk_err_t fft_hal_fir_int_en(uint32_t value); 36 bk_err_t fft_hal_fir_en(uint32_t value); 37 int32 fft_hal_data_read(void); 38 bk_err_t fft_hal_data_write(uint32_t value); 39 bk_err_t fft_hal_fir_coef_write(int32 value); 40 bk_err_t fft_hal_start_trigger_set(uint32_t value); 41 42 #if CFG_HAL_DEBUG_FFT 43 void fft_struct_dump(void); 44 #else 45 #define fft_struct_dump() 46 #endif 47 48 49 #ifdef __cplusplus 50 } 51 #endif 52