main.h 776 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #define LOCALDIFF +9 /* Time difference from UTC [hours] */
  3. #define IVT_SYNC 180 /* f_sync() interval (0:no periodic sync) [sec] */
  4. #define VI_LVL 9.0 /* Blackout threshold [volt] */
  5. #define VI_LVH 10.0 /* Recharge threshold [volt] */
  6. #define VI_MULT (10.0 / 130 / 3.0 * 1024)
  7. #define BEEP_ON() 0
  8. #define BEEP_OFF() 0
  9. #define LEDG_ON() PORTB &= ~_BV(0)
  10. #define LEDG_OFF() PORTB |= _BV(0)
  11. #define GPS_ON() PORTC |= _BV(1)
  12. #define GPS_OFF() PORTC &= ~_BV(1)
  13. #define DELAY_MS(d) {for (Timer = (BYTE)(d / 10); Timer; ) ; }
  14. #define FLAGS GPIOR0 /* Status flags and bit definitions */
  15. #define F_POW 0x80 /* Power */
  16. #define F_GPSOK 0x08 /* GPS data valid */
  17. #define F_SYNC 0x04 /* Sync request */
  18. #define F_LVD 0x01 /* Low battery detect */