Projet_S5 / Mbed 2 deprecated Repo_Noeud_Mobile_refactor

Dependencies:   mbed-rtos mbed

Fork of Repo_Noeud_Mobile by Projet_S5

Structures/Structure.h

Committer:
llarose
Date:
2015-03-22
Revision:
20:96280625532c
Parent:
13:4aa3e6eb0120
Child:
22:cccb77300fd5

File content as of revision 20:96280625532c:

#pragma once

typedef char GantsID;
typedef char GameID;
typedef char PlayerID;
typedef char SongID;
typedef char GameMode;

typedef struct {
    GameID  game;
    PlayerID     players[2];
    PlayerID    winner;
    int     score_winner;
    int         score_looser;
} Game_Stats;

typedef struct {
    uint16_t     x;
    uint16_t     y;
    uint16_t     z;
} Accel;

typedef struct {
    GameID  game;
    PlayerID    players;
    SongID     track_played;
} Game_Stats_AirGuitar;

typedef struct {
    GantsID     gants;
    Accel       accelData;    // donnée accéléromètre.
    bool       majeur;
    bool       index;
    bool       annulaire;
} Mobile_Vers_Fixe;

// Mailbox data.
struct Message {
    Mobile_Vers_Fixe donnees;
};

typedef struct {
    bool index;
    bool majeur;
    bool annulaire;
    unsigned short indexU32;
    unsigned short majeurU32;
    unsigned short annulaireU32;
} flex_t;

typedef char GantsID;

typedef struct {
    GantsID gants;
    char    xyz[6];
    flex_t  flexSensors;
} Mobile_Vers_Fixe;

struct message {
    Mobile_Vers_Fixe donnees;
};