123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
183:c7a9c309086c
Parent:
182:2bd8ec44998f
--- a/DeviceDither.h	Sun Jul 10 05:35:08 2016 +0000
+++ b/DeviceDither.h	Sun Jul 31 06:19:02 2016 +0000
@@ -14,7 +14,7 @@
   int32_t max;            //max pulse width - 0...1 in 16.16 format
   int32_t rise;           //rising edge position in 10 mks resolution ticks
   int32_t fall;           //falling edge position in 10 mks resolution ticks
-  uint32_t counter;       //10 mks resolution counter, zeroed at each dither half period
+  int32_t counter;       //10 mks resolution counter, zeroed at each dither half period
 } DeviceDitherPulseState;
 
 typedef struct _DeviceDitherPulse {
@@ -25,14 +25,14 @@
 //Dither noise typedefs
 typedef struct _DeviceDitherNoiseSettings {
   int8_t enabled;
-  int32_t period;         //base (constant) part of noise period - 0...100 measurement cycles
+  int32_t period;         //base (fixed) part of noise period - 0...100 measurement cycles
   int32_t range;          //variable (random) part of noise period - 0...50 measurement cycles
   int32_t amplitude;      //pulse width variation amplitude
 } DeviceDitherNoiseSettings;
 
 typedef struct _DeviceDitherNoiseState {
   int8_t enabled;
-  int32_t period;         //base (constant) part of noise state update period - 0...100 measurement cycles
+  int32_t period;         //base (fixed) part of noise state update period - 0...100 measurement cycles
   int32_t range;          //variable (random) part of noise state update period - 0...50 measurement cycles
   int32_t amplitude;      //pulse width variation amplitude
   int32_t counter;        //noise state update counter - 0 ... (period + range - 1) in measurement cycles
@@ -213,4 +213,12 @@
 uint16_t ditherGetRawPulseState(void);
 #define var_L_Vibro() ditherGetRawPulseState()
 
+//VBN_Tzd s16 adjusted noise period
+//int32_t device.dither.noise.settings.period
+uint16_t param_VBN_Tzd(void);
+
+//VBN_Ran s16 range of the random component of noise
+//int32_t device.dither.noise.settings.range
+uint16_t param_VBN_Ran(void);
+
 #endif  /* __DEVICE_DITHER_H__ */
\ No newline at end of file