/*
 * Copyright 2022 MindMotion Microelectronics Co., Ltd.
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */


#ifndef __AUDIO_PORT_H__
#define __AUDIO_PORT_H__

#include <stdint.h>
#include <stdbool.h>

/* status. */
#define AUDIO_STATUS_XFER_HALF          (1u << 0u)
#define AUDIO_STATUS_XFER_DONE          (1u << 1u)

/* requests */
#define AUDIO_REQ_XFER_STOP             (1u << 0u)

void Audio_Setup(uint32_t sample_rate, uint16_t * buf, uint32_t buf_len);
void Audio_Enable(bool enable);

uint32_t Audio_GetStatus(void);
void     Audio_ClearStatus(uint32_t status);

#endif /* __AUDIO_PORT_H__ */
