Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***********************************************************************
- *
- * FILE : RX113_telephone.c
- * DATE : 2019-03-04
- * DESCRIPTION : Main Program
- *
- * NOTE:THIS IS A TYPICAL EXAMPLE.
- *
- ***********************************************************************/
- #include "main_st.h"
- uint8_t phone_status = 0;
- void main(void);
- void phone_status_determine(void);
- void main(void)
- {
- DTMF_WaveStep_Calculation();
- Ring_WaveStep_Calculation();
- // Save_PhoneNum(0x100400);
- while (1U)
- {
- phone_status_determine();
- }
- }
- void phone_status_determine(void){
- if(phone_status == 1){
- phone_status = 0;
- Set_Attn(1.0 ,1.0); // L_attn: 0.0~1.0 H_attn : 0.0~1.0
- DTMF_dial(0);
- }else if(phone_status == 2){
- phone_status = 0;
- DTMF_dial(16);
- }else if (phone_status == 3){
- phone_status = 0;
- DTMF_FFT_start();
- }else if (phone_status == 4){
- phone_status = 0;
- DTMF_FFT_stop();
- }else if(phone_status == 5){
- phone_status = 0;
- Ring_start();
- }else if(phone_status == 6){
- phone_status = 0;
- Ring_stop();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement