Exercice 2 - Etude de la machine à états

Dependencies:   mbed tsi_sensor

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers lib.h Source File

lib.h

00001 /* This defines will be replaced by PinNames soon */
00002 #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z)
00003 #define ELEC0 9
00004 #define ELEC1 10
00005 #elif defined (TARGET_KL05Z)
00006 #define ELEC0 9
00007 #define ELEC1 8
00008 #else
00009 #error TARGET NOT DEFINED
00010 #endif
00011 
00012 TSIAnalogSlider tsi(ELEC0, ELEC1, 40);
00013 float lire_slider()
00014 {
00015     return (tsi.readPercentage());
00016 }