y

Dependencies:   HSI2RGBW_PWM mbed fct_aide FastAnalogIn mbed-dsp NVIC_set_all_priorities

Committer:
achille
Date:
Mon Jun 03 13:10:11 2019 +0000
Revision:
7:8a2a7633224b
Parent:
6:13112e35988b
Child:
8:e576f4eea51b
a jour;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
achille 6:13112e35988b 1 #include "mbed.h"
achille 6:13112e35988b 2
achille 7:8a2a7633224b 3 DigitalOut ledV(D13);
achille 7:8a2a7633224b 4 DigitalOut ledR1(D12);
achille 7:8a2a7633224b 5 DigitalOut ledR2(D11);
achille 6:13112e35988b 6
achille 7:8a2a7633224b 7 int led_set(int flagV, int flagR1,int flagR2){
achille 7:8a2a7633224b 8 if(flagV){
achille 7:8a2a7633224b 9 ledV=1;
achille 7:8a2a7633224b 10 }
achille 7:8a2a7633224b 11 else{
achille 7:8a2a7633224b 12 ledV=0;
achille 7:8a2a7633224b 13 }
achille 7:8a2a7633224b 14 if(flagR1){
achille 7:8a2a7633224b 15 ledR1=1;
achille 7:8a2a7633224b 16 }
achille 7:8a2a7633224b 17 else{
achille 7:8a2a7633224b 18 ledR1.write(0);
achille 7:8a2a7633224b 19 }
achille 7:8a2a7633224b 20 if(flagR2){
achille 7:8a2a7633224b 21 ledR2=1;
achille 7:8a2a7633224b 22 }
achille 7:8a2a7633224b 23 else{
achille 7:8a2a7633224b 24 ledR2=0;
achille 7:8a2a7633224b 25 }
achille 6:13112e35988b 26 }