Files
P4-USB-transfer/main/NS4168/ns4168.h
T

30 lines
747 B
C
Raw Normal View History

2026-10-13 21:54:50 +08:00
#ifndef __NS4168_H__
#define __NS4168_H__
#include "driver/gpio.h"
#include "driver/i2s.h"
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
/* 先用宏定义占位引脚,后续再改成实际板子上的 GPIO */
#define NS4168_I2S_PORT I2S_NUM_1
#define NS4168_CTRL_GPIO GPIO_NUM_33
#define NS4168_I2S_BCK_PIN GPIO_NUM_31
#define NS4168_I2S_WS_PIN GPIO_NUM_32
#define NS4168_I2S_DOUT_PIN GPIO_NUM_30
#define NS4168_I2S_SAMPLE_RATE 24000
#define NS4168_I2S_BITS I2S_BITS_PER_SAMPLE_16BIT
#define NS4168_I2S_CHANNELS I2S_CHANNEL_FMT_ONLY_RIGHT
esp_err_t ns4168_i2s_init(void);
esp_err_t ns4168_start_white_noise_test(void);
#ifdef __cplusplus
}
#endif
#endif /* __NS4168_H__ */