Files

copied
Last update 8 years 4 months
Files
tests
.gitignore
.travis.yml
Makefile
README.md
button_fsm.c
button_fsm.h
hall_fsm.c
hall_fsm.h
light-control.brd
light-control.sch
main.c
messages.c
messages.h
port.c
port.h
room_fsm.c
room_fsm.h
timers.c
timers.h
room_fsm.h
#include "port.h" #define STATE_ROOM_DARK 0 #define STATE_ROOM_LIGHT_WAIT_SWITCH 1 #define STATE_ROOM_CHAN0_WAIT_SWITCH 2 #define STATE_ROOM_LIGHT 3 #define SWITCH_TIMEOUT 500 typedef struct { uint8_t timer_id; uint8_t msg_id_switch; uint8_t msg_id_off; Port *port0; Port *port1; } Room; uint8_t room_fsm(uint8_t state, Room *room);
Report a bug