Atm_sweep.h 592 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <Automaton.h>
  3. class Atm_sweep: public Machine {
  4. public:
  5. Atm_sweep( void ) : Machine() {};
  6. enum { IDLE, U0, U1, U2, U3, U4, U5, D4, D3, D2, D1, D0 };
  7. enum { EVT_TIMER, EVT_START, EVT_STOP, EVT_TOGGLE, ELSE };
  8. enum { ENT_L0, ENT_L1, ENT_L2, ENT_L3, ENT_L4, ENT_L5, ENT_OFF };
  9. Atm_sweep & begin( int p1, int p2, int p3, int p4, int p5, int p6 );
  10. Atm_sweep & speed( uint32_t v );
  11. Atm_sweep & trace( Stream & stream );
  12. private:
  13. short pin[6];
  14. atm_timer_millis timer;
  15. int event( int id );
  16. void action( int id );
  17. };