📄 audio.h
字号:
//*----------------------------------------------------------------------------
//* ATMEL Microcontroller Software Support - ROUSSET -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name : audio.h
//* Object
//* 1.1 04/Apr/05 JPP
//*----------------------------------------------------------------------------
#ifndef Audio_h
#define Audio_h
//* PDC srtucture
#define INDEX_MAX 128
#define FIRST_PDC 0
#define NEXT_PDC 1
#define INIT_PDC 2
typedef void (*AT91F_AUDIO_FUNCTION) (char *ptr_data,int size);
typedef struct _AT91S_PWMC_PDC {
AT91F_AUDIO_FUNCTION func;
unsigned int index;
unsigned int state;
unsigned char sample[INDEX_MAX*2];
} AT91S_PWMC_PDC, *AT91PS_PWMC_PDC;
extern AT91S_PWMC_PDC OutputSample;
extern void AT91F_PWM_OutputSample_init(void);
extern void SetConstant(char val);
extern void OutputConstant(char *ptr_data,int size);
extern void SinusInit(void);
extern void SetSinus(unsigned int freq );
extern void OutputSinus(char *ptr_data,int size);
extern void SetRamp(unsigned int freq );
extern void OutputRamp(char *ptr_data,int size);
void OutputSample_init(AT91F_AUDIO_FUNCTION func);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -