onoffswitch.h 387 B

12345678910111213141516
  1. #ifndef ONOFFSWITCH_H_
  2. #define ONOFFSWITCH_H_
  3. enum onoff_state {
  4. ONOFF_IS_OFF, /* Switch is "off". */
  5. ONOFF_IS_ON, /* Switch is "on". */
  6. ONOFF_SWITCHED_OFF, /* Switch was just turned "off". */
  7. ONOFF_SWITCHED_ON, /* Switch was just turned "on". */
  8. };
  9. void onoffswitch_init(void);
  10. void onoffswitch_work(void);
  11. enum onoff_state onoffswitch_get_state();
  12. #endif /* ONOFFSWITCH_H_ */