Page 108 - MDP2022-2
P. 108

case  0x01:  {
                    digitalWrite(PB12,  data&0x08);

                    break;
                }
                case  0x04  :  digitalWrite(PC6,  data&0x08);
                    break;
                case  0x05  :  {digitalWrite(PC8,  data&0x08);

                    break;
                }
                case  0x02  :  {
                        digitalWrite(PB11,  data  &  0x08);
                        Serial.print(data  &  0x08);
                        break;
                }
            }
            }




            uint8_t  user_clk  =  digitalRead(PC0);


            void  Exti(){
                static  uint8_t  state_V  =  0;
                    state_V  |=  digitalRead(PC3);
                    state_V  |=  digitalRead(PF3)<<1;
                    state_V  |=  digitalRead(PF5)<<2;
                    state_V  |=  digitalRead(PF10)<<3;
                    a  =  state_V;
                    activee_command(state_V);
                    Serial.println(state_V);
                    state_V=0;
                }


            void  setup()  {
                Wire.setSDA(PB9);
                Wire.setSCL(PB8);
                Wire.begin();
                Serial.begin(9600);



                pinMode(PF0,  OUTPUT);
                pinMode(PF1,  OUTPUT);
                pinMode(PF2,  OUTPUT);
                pinMode(PC3,  INPUT);
   103   104   105   106   107   108   109   110   111   112   113