APP 4

Dependencies:   mbed CRC16 mbed-rtos

Committer:
manl2003
Date:
Tue Feb 23 21:15:05 2016 +0000
Revision:
27:011ad1667040
Parent:
26:f2b37f9dfca9
Tout beau, mef inclue.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vinbel93 26:f2b37f9dfca9 1 // Vincent Bélanger et Laurent Mandrile
vinbel93 26:f2b37f9dfca9 2 // belv1802 - manl2003
vinbel93 26:f2b37f9dfca9 3
vinbel93 1:f212b6676849 4 #pragma once
vinbel93 1:f212b6676849 5
vinbel93 26:f2b37f9dfca9 6 // Fonction d'encodage Manchester
vinbel93 6:3181f546e812 7 inline bool encode(bool bit, bool clock)
vinbel93 6:3181f546e812 8 {
vinbel93 6:3181f546e812 9 return (bit == clock);
vinbel93 6:3181f546e812 10 }
vinbel93 26:f2b37f9dfca9 11
vinbel93 26:f2b37f9dfca9 12 // Le décodage est effectué directement dans l'interrupt du Capture car il s'agit d'un simple opérateur logique NOT sur l'entrée