Oleg Bogachev / Mbed 2 deprecated PLC1608-V1

Dependencies:   PCAL955x mbed mbed-rtos AT45

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers task_pb1.cpp Source File

task_pb1.cpp

00001 
00002 /*******************  логическая задача 1 ************************/
00003 //
00004 //
00005 
00006 #include "ext_vars.h"
00007 
00008 
00009 int task_pb1()
00010 {     
00011     int  sts=0 ;    
00012    
00013     if(x01==1){y101=1;} else {y101=0; }
00014     if(x02==1){y102=1;} else {y102=0; }
00015     if(x03==1){y103=1;} else {y103=0; }
00016     if(x04==1){y104=1;} else {y104=0; }
00017     if(x05==1){y105=1;} else {y105=0; }
00018     if(x06==1){y106=1;} else {y106=0; }
00019     
00020     
00021     // control  SM-moduls
00022     if(x07==1 &&  mx07==0){
00023         sm_position = 17 ;
00024         b101 = 1 ;
00025         b102 = 0 ;
00026     }
00027     if(x08==1 &&  mx08==0){
00028         sm_position = 3 ;
00029         b101 = 0 ;
00030         b102 = 1 ;
00031     }
00032     
00033     sts=1; 
00034     return sts;
00035 }
00036