Elevator v2.0
Elevator Documenation
Loading...
Searching...
No Matches
elevator.h
Go to the documentation of this file.
1#ifndef _ELEVATOR_H_
2#define _ELEVATOR_H_
3
4#include "stdint.h"
5
32typedef enum cartState_t
33{
34 IDLE = 0,
35 MOVE = 1,
36 STOP = 2,
39
40
57typedef enum direction_t
58{
59 DOWN = 0,
60 UP = 1,
61 NONE = -1,
63
64
79typedef enum door_t
80{
81 OPEN = 0,
82 CLOSE = 1,
84
102typedef struct Elevator
103{
104 uint8_t currFloor;
105 uint8_t destination;
111
112#endif
cartState_t
cartState_t elevator.h
Definition: elevator.h:33
@ EMERGENCY
Definition: elevator.h:37
@ STOP
Definition: elevator.h:36
@ MOVE
Definition: elevator.h:35
@ IDLE
Definition: elevator.h:34
door_t
door_t elevator.h
Definition: elevator.h:80
@ OPEN
Definition: elevator.h:81
@ CLOSE
Definition: elevator.h:82
direction_t
direction_t elevator.h
Definition: elevator.h:58
@ DOWN
Definition: elevator.h:59
@ UP
Definition: elevator.h:60
@ NONE
Definition: elevator.h:61
Elevator elevator.h.
Definition: elevator.h:103
uint8_t destination
Definition: elevator.h:105
cartState_t prevState
Definition: elevator.h:108
direction_t dir
Definition: elevator.h:109
uint8_t currFloor
Definition: elevator.h:104
cartState_t state
Definition: elevator.h:107
door_t door
Definition: elevator.h:106