Portier Wireless Le portier sans fil est un système bidirectionnel basé sur un microcontrôleur PIC32MX130F064B-I/SS et un module radio 868 MHz, permettant à un visiteur d’envoyer une requête depuis l’extérieur via un bouton alimenté par piles, et à l’occupant du bureau de répondre par des signaux lumineux et sonores grâce à une unité intérieure alimentée en USB, le tout avec appairage sécurisé et gestion autonome de l’énergie.
Chargement...
Recherche...
Aucune correspondance
Management.h
Aller à la documentation de ce fichier.
1//--------------------------------------------------------
2// DoorBellMgmt.h
3//--------------------------------------------------------
4// Header pour gestion Door et Bell du système PortierWireless
5//
6// Auteurs : Projet ETML / adaptation LMS
7// Date : 2025
8// Version : V3.0
9// Compilateur : XC32
10//--------------------------------------------------------
11
12#ifndef DOORBELLMGMT_H
13#define DOORBELLMGMT_H
14
15//----------------------
16// Inclusions
17//----------------------
18#include <stdint.h> // Types entiers standard
19#include <stdbool.h> // Types booléens standard
20#include "Mc32Debounce.h" // Gestion anti-rebond des boutons
21#include "app.h" // Définition de APP_DATA
22
23//----------------------
24// Définitions d'états
25//----------------------
26
27// États internes pour la gestion de la porte (Door)
28typedef enum
29{
30 DOOR_STATE_INIT = 0, // Initialisation
31 DOOR_STATE_PRESSED, // Bouton pressé
32 DOOR_STATE_WAITING, // En attente de réponse
33 DOOR_STATE_ANSWER, // Réponse reçue
34 DOOR_STATE_NOANSWER, // Pas de réponse
35 DOOR_STATE_SHUTDOWN // Arrêt du système
37
38// États internes pour la gestion de la sonnette (Bell)
39typedef enum
40{
41 BELL_STATE_INIT = 0, // Initialisation
42 BELL_STATE_IDLE, // Attente (repos)
43 BELL_STATE_RING // Sonnerie active
45
46//----------------------
47// Prototypes de fonctions
48//----------------------
49
50// Gestion de la porte
51void Door_Mgmt(void);
52
53// Gestion de la sonnette
54void Bell_Mgmt(void);
55
56//----------------------
57// Variables externes
58//----------------------
59
60// Descripteurs pour l'anti-rebond des boutons
61extern S_SwitchDescriptor swRing; // Bouton de sonnerie
62extern S_SwitchDescriptor swEnter; // Bouton d'entrée
63extern S_SwitchDescriptor swWait; // Bouton d'attente
64extern S_SwitchDescriptor swBusy; // Bouton d'occupation
65
66// Données globales de l'application
67extern APP_DATA appData;
68
69#endif // DOORBELLMGMT_H
BELL_STATES
Definition Management.h:40
@ BELL_STATE_IDLE
Definition Management.h:42
@ BELL_STATE_RING
Definition Management.h:43
@ BELL_STATE_INIT
Definition Management.h:41
DOOR_STATES
Definition Management.h:29
@ DOOR_STATE_ANSWER
Definition Management.h:33
@ DOOR_STATE_INIT
Definition Management.h:30
@ DOOR_STATE_SHUTDOWN
Definition Management.h:35
@ DOOR_STATE_WAITING
Definition Management.h:32
@ DOOR_STATE_PRESSED
Definition Management.h:31
@ DOOR_STATE_NOANSWER
Definition Management.h:34
void Bell_Mgmt(void)
Gestion de la carte de sonnerie (Bell_Mgmt).
Definition Management.c:218
void Door_Mgmt(void)
Gestion du bouton-poussoir de la porte avec filtre de pairing intégré.
Definition Management.c:37
S_SwitchDescriptor swRing
Definition app.c:86
S_SwitchDescriptor swBusy
Definition app.c:83
APP_DATA appData
Definition app.c:77
S_SwitchDescriptor swEnter
Definition app.c:80
S_SwitchDescriptor swWait
Definition app.c:89
Definition app.h:87
Definition Mc32Debounce.h:48