📄 pcm.h
字号:
/***********************************************************************
* $Workfile: pcm.h $
* $Revision: 1.0 $
* $Author: AnvikE $
* $Date: Jul 03 2003 17:32:18 $
*
* Project:
*
* Description:
*
* Revision History:
* $Log:
***********************************************************************
*
* Copyright (c) 2002 Sharp Microelectronics of the Americas
*
* All rights reserved
*
* SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION
* OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE,
* AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES,
* SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE.
*
* SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY
* FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A
* SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE
* FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS.
*
**********************************************************************/
#ifndef PCM_H
#define PCM_H
/*
* lh754xx chip related macros and defines
* location - [sharpmcu/software/csps/lh754xx/include]
*/
#include "lh754xx_chip.h"
/* sound structure */
typedef struct PCM_SOUND_CLIP_S
{
/* name of the sound clip */
CHAR* name;
/* title of the sound clip */
CHAR* title;
/* number of samples in the clip */
UNS_32 size;
/* maximum counts per sample */
INT_32 cnts_per_pulse;
/* rate at which the clip was sampled */
INT_32 sample_rate;
/* full scale pcm value */
UNS_32 full_scale_value;
/* sample size 1 - 8bits 2 - 16bits */
UNS_32 sample_size;
/* sample mask */
UNS_16 sample_mask;
} PCM_SOUND_CLIP_T, *PPCM_SOUND_CLIP_T;
/* driver structure */
typedef struct PCM_DRIVER_S
{
/* reference to sound clips */
PCM_SOUND_CLIP_T* sound;
/* number of clips */
UNS_32 nclips;
/* callback method used to signal when clip is done */
PFV cb;
/* mode of operation - single ended or diffential */
UNS_32 mode;
} PCM_DRIVER_T, *PPCM_DRIVER_T;
/* driver modes */
typedef enum
{
/* use to driver in differential mode */
PCM_DIFFERENTIAL = 0,
/* use to driver in single ended mode */
PCM_SINGLE_ENDED
} PCM_MODE_T;
#if defined(__cplusplus)
extern "C"
{
#endif
EXTERN void pcm_start_codec (INT_32, INT_32, INT_32);
EXTERN void pcm_stop_codec (void);
EXTERN void pcm_to_pwm_sample (void);
EXTERN CHAR* pcm_get_clip_name (INT_32);
EXTERN void pcm_init_codec (void*, UNS_32);
EXTERN UNS_32 pcm_get_sample_rate (INT_32);
EXTERN UNS_32 pcm_get_max_clips (void);
EXTERN UNS_32 pcm_get_name (INT_32);
#if defined(__cplusplus)
}
#endif
#endif /* PCM_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -