Skip to content

Commit

Permalink
Added lifespan constant
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkrapido committed Jun 13, 2020
1 parent 5f38d6b commit df86793
Show file tree
Hide file tree
Showing 2 changed files with 595 additions and 593 deletions.
76 changes: 39 additions & 37 deletions lifeclock-v1/constants.h
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
#ifndef CONSTANTS_H
#define CONSTANTS_H

#define LED_PIN 6
#define SET_LED_PIN 42
#define DATE_LED_PIN 43
#define TIME_LED_PIN 44
#define BIRTHDAY_LED_PIN 45

#define BCDA_PIN 23
#define BCDB_PIN 24
#define BCDC_PIN 25
#define BCDD_PIN 26

#define FIRST_PIN 8

#define SHORT_PRESS_TIMEOUT 800
#define LONG_PRESS_TIMEOUT 1200
#define SET_STATE_TIMEOUT 15000
#define CLOCK_STATE_TIMEOUT 5000
#define BLINK_MS 250
#define REPEAT_MS 100

#define BTN_UP_PIN 7
#define BTN_DOWN_PIN 5
#define BTN_RESET_PIN 4

#define BTN_UP 0
#define BTN_DOWN 1
#define BTN_RESET 2

#define STATE_CLOCK 0
#define STATE_SET_CLOCK 1
#define STATE_SET_BIRTHDAY 2
#define STATE_DEBUG 3

#endif
#ifndef CONSTANTS_H
#define CONSTANTS_H

#define DESIRED_LIFESPAN 100

#define LED_PIN 6
#define SET_LED_PIN 42
#define DATE_LED_PIN 43
#define TIME_LED_PIN 44
#define BIRTHDAY_LED_PIN 45

#define BCDA_PIN 23
#define BCDB_PIN 24
#define BCDC_PIN 25
#define BCDD_PIN 26

#define FIRST_PIN 8

#define SHORT_PRESS_TIMEOUT 800
#define LONG_PRESS_TIMEOUT 1200
#define SET_STATE_TIMEOUT 15000
#define CLOCK_STATE_TIMEOUT 5000
#define BLINK_MS 250
#define REPEAT_MS 100

#define BTN_UP_PIN 7
#define BTN_DOWN_PIN 5
#define BTN_RESET_PIN 4

#define BTN_UP 0
#define BTN_DOWN 1
#define BTN_RESET 2

#define STATE_CLOCK 0
#define STATE_SET_CLOCK 1
#define STATE_SET_BIRTHDAY 2
#define STATE_DEBUG 3

#endif
Loading

0 comments on commit df86793

Please sign in to comment.