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:
22:cccb77300fd5
Parent:
20:96280625532c
Child:
23:5bb76b7c35da

File content as of revision 22:cccb77300fd5:

#pragma once

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

enum GameMode_e { GUNNER, RPS, AirGuitar};

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_t;

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

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

typedef struct {
    GantsID     gants;
    Accel_t       accelData;    // donnée accéléromètre.
    flex_t      flexSensor;
} Mobile_Vers_Fixe;

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