MCU API

优质
小牛编辑
131浏览
2023-12-01
/* Voice Signal Preprocess
 * Copyright (C) 1991-2017 Nationalchip Co., Ltd
 * All Rights Reserved!
 *
 * snpu.h: Device Driver for SNPU
 *
 */

#ifndef __SNPU_H__
#define __SNPU_H__

int SnpuInit(void);
int SnpuLoadFirmware(void);
int SnpuDone(void);

#ifdef CONFIG_GX8010NRE
int SnpuFloat32To16(unsigned int *in_data, unsigned short *out_data, int num, int exponent_width);
int SnpuFloat16To32(unsigned short *in_data, unsigned int *out_data, int num, int exponent_width);
#endif

typedef enum {
    SNPU_IDLE,
    SNPU_BUSY,
    SNPU_STALL,
} SNPU_STATE;

typedef int (*SNPU_CALLBACK)(SNPU_STATE state, void *private_data);

typedef struct {
    const char *version; // version in model.c
    void *ops; // ops_content in model.c
    void *data; // cpu_content in model.c
    void *input; // input in model.c
    void *output; // output in model.c
    void *cmd; // npu_content in model.c
    void *tmp_mem; // tmp_content in model.c
} SNPU_TASK;

int SnpuRunTask(SNPU_TASK *task, SNPU_CALLBACK callback, void *private_data);

SNPU_STATE SnpuGetState(void);

#endif // __SNPU_H__

最后更新:

类似资料

  • 支持2/4/6/8路麦克风阵列,集成8通道ADC/I2S/PDM,支持模拟麦和数字麦,内置DSP,支持降噪、AEC、Beamforming、去混响等算法。

  • 概述 GX8010 Smart Speaker Develop(简称SSD)是面向智能音箱应用而设计的方案,运行离线的demo程序后可进行基本的本地语音交互。SSD 平台具备如下特点: 6 路模拟MEMS 麦克风 4 个功能按键 12 个RGB 3 色LED 阵列 WIFI+BT 组合模块 TF 卡插槽 两个10W 40Ohm 扬声器 2200 毫安时电池,带充电功能 USB2.0 主机与从机接口

相关阅读