#ifndef __COMUNICATION_H
#define __COMUNICATION_H

#include "stdint.h"

#define SizeMes 8

#define STATUS		0x00
#define READACTI	0x10
#define WRITACTI	0x20
#define READVENT	0x30
#define WRITVENT	0x40

#define RESERVE2	0x60
#define DELAYBRA	0x70
#define SYNCRTC		0x80
#define FEED		0x90

#define MASKMES 0XF0

extern enum EtatNourrisage Nourrisage;

uint8_t parse(uint8_t* mes);

void Status();

void ReadAction();
void WriteAction(uint8_t* mes);
void ReadVent();
void WriteVent(uint8_t* mes);
void DelayBra(uint8_t* mes);
void SyncRTC(uint8_t* mes);

#endif

