![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Exercice 2 - Etude de la machine à états
lib.h@0:6608f0b5205c, 2018-10-28 (annotated)
- Committer:
- vermaelen
- Date:
- Sun Oct 28 16:20:55 2018 +0000
- Revision:
- 0:6608f0b5205c
DM2 Exercice 2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vermaelen | 0:6608f0b5205c | 1 | /* This defines will be replaced by PinNames soon */ |
vermaelen | 0:6608f0b5205c | 2 | #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z) |
vermaelen | 0:6608f0b5205c | 3 | #define ELEC0 9 |
vermaelen | 0:6608f0b5205c | 4 | #define ELEC1 10 |
vermaelen | 0:6608f0b5205c | 5 | #elif defined (TARGET_KL05Z) |
vermaelen | 0:6608f0b5205c | 6 | #define ELEC0 9 |
vermaelen | 0:6608f0b5205c | 7 | #define ELEC1 8 |
vermaelen | 0:6608f0b5205c | 8 | #else |
vermaelen | 0:6608f0b5205c | 9 | #error TARGET NOT DEFINED |
vermaelen | 0:6608f0b5205c | 10 | #endif |
vermaelen | 0:6608f0b5205c | 11 | |
vermaelen | 0:6608f0b5205c | 12 | TSIAnalogSlider tsi(ELEC0, ELEC1, 40); |
vermaelen | 0:6608f0b5205c | 13 | float lire_slider() |
vermaelen | 0:6608f0b5205c | 14 | { |
vermaelen | 0:6608f0b5205c | 15 | return (tsi.readPercentage()); |
vermaelen | 0:6608f0b5205c | 16 | } |