/*
 * mesdefs.h
 *
 *  Created on: 30 janv. 2016
 *      Author: jmcv
 */

#ifndef MESDEFS_H_
#define MESDEFS_H_

typedef unsigned char octet;
typedef unsigned short mot;
typedef unsigned int longmot;

/* Definition d'un champ de bits pour une optimisation de l'usage de la RAM. Version 8 bits */
typedef union
	{struct
		{	octet b0:1;
	 		octet b1:1;
	 		octet b2:1;
	 		octet b3:1;
	 		octet b4:1;
	 		octet b5:1;
	 		octet b6:1;
	 		octet b7:1;
 		} bit_a_bit;
 	 octet tout_a_la_fois;
 	} mon_champ_8;

 /* Definition d'un champ de bits pour une optimisation de l'usage de la RAM. Version 16 bits */
 typedef union
 		{struct
 			{	mot b0:1;
 				mot b1:1;
 				mot b2:1;
 				mot b3:1;
 				mot b4:1;
 				mot b5:1;
 				mot b6:1;
 				mot b7:1;
 				mot b8:1;
				mot b9:1;
				mot b10:1;
				mot b11:1;
				mot b12:1;
				mot b13:1;
				mot b14:1;
				mot b15:1;
 	 		} bit_a_bit;
 	 	 mot tout_a_la_fois;
 	 	} mon_champ_16;


#endif /* MESDEFS_H_ */
