Advertisement
gr4viton

status change

Mar 17th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public enum e_spiStatus
  2. {
  3. connected, notConnected
  4. }
  5.  
  6. public class StateMachine
  7. {
  8. public static e_spiStatus spiStatus;
  9.  
  10. public void ChangeStatus(e_spiStatus _spiStatus)
  11. {
  12. spiStatus = _spiStatus;
  13. switch(spiStatus)
  14. {
  15. case(e_spiStatus.connected):
  16. // set all the stuff
  17. break;
  18. case(e_spiStatus.notConnected):
  19. // set all the stuff
  20. break;
  21. }
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement