Basic_sine_wave_generator

Dependencies:   mbed 4DGL-uLCD-SE mbed-rtos AD5206

Revision:
11:d21c2da8b290
Parent:
10:159f38636ed4
--- a/para.cpp	Tue Dec 01 18:59:42 2015 +0000
+++ b/para.cpp	Wed Dec 02 19:48:56 2015 +0000
@@ -1,17 +1,21 @@
+/*
+* Author: Hanjie Xie
+* para.cpp
+*/
 #include "para.h"
 #include "mbed.h"
 
 para::para() {
     waveform_type=0; //0 for sine, 
-    freq=1000; //Hz
+    freq=2000; //Hz
     amp=1.65; //Sacle factor, 1=full range
-    offset=1.65;   
+    //offset=1.65;   
 }
 void para::set_type(int a)
 {
     waveform_type = a;
 }
-void para::set_freq(int a)
+void para::set_freq(float a)
 {
     freq = a;
 }
@@ -19,11 +23,8 @@
 {
     amp = a;
 }
-void para::set_offset(float a)
-{
-    offset = a;
-}
+
 int para::get_type(){return waveform_type;}
-int para::get_freq(){return freq;}
+float para::get_freq(){return freq;}
 float para::get_amp(){return amp;}
-float para::get_offset(){return offset;}
\ No newline at end of file
+//float para::get_offset(){return offset;}
\ No newline at end of file