Motoo Tanaka / Mbed 2 deprecated oscilloscope Featured

Dependencies:   SPI_STMPE610 UniGraphic mbed vt100

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers trig.cpp Source File

trig.cpp

00001 /** mbed oscilloscope my implementation of a oscillo scope
00002  * Copyright (c) 2014, 2015 Motoo Tanaka @ Design Methodology Lab
00003  *
00004  * trig.cpp
00005  *
00006  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00007  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00008  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00009  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00010  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00011  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00012  * THE SOFTWARE.
00013  */
00014 #include "trig.h"
00015 extern int pane_w ;
00016 extern float vref ;
00017 // trigger related values
00018 int trig_mode = TRIG_MODE_NONE ;
00019 int sampling_status = ST_TRIG_HIT ;
00020 int trig_ch = 0 ;
00021 int trig_pos = pane_w / 2 ; /* half of the frame */
00022 int post_trig_len = memLength ; 
00023 //float trig_level = 0.0 ;
00024 float trig_level = vref / 2.0 ;
00025 uint16_t utrig_level = 0 ;
00026 int trig_index = 0 ; 
00027 int post_trig_index = 0 ;
00028 int trig_level_margin = 100 ;
00029 
00030 char *trig_name[] = { " NONE ", " RISE ", " FALL ", " LEVEL" } ;