Revision 2920c6b7 core/src/aos_main.cpp

View differences:

core/src/aos_main.cpp
872 872
  // local variables
873 873
  eventmask_t eventmask = 0;
874 874
  eventflags_t eventflags = 0;
875
  eventflags_t eventflagsmask = AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK;
875 876
  aos_shutdown_t shutdown = AOS_SHUTDOWN_NONE;
876 877
#if defined(AMIROOS_CFG_MAIN_EXTRA_THREAD_VARIABLES)
877 878
  AMIROOS_CFG_MAIN_EXTRA_THREAD_VARIABLES
......
956 957

  
957 958
  /* event associations */
958 959
#if (AMIROOS_CFG_SSSP_ENABLE == true)
959
#if (AMIROOS_CFG_SSSP_STACK_START == true) && (AMIROOS_CFG_SSSP_STACK_END == true)
960
  chEvtRegisterMaskWithFlags(&aos.events.io, &_eventListenerIO, IOEVENT_MASK, MODULE_SSSP_EVENTFLAGS_PD | MODULE_SSSP_EVENTFLAGS_SYNC);
961
#elif (AMIROOS_CFG_SSSP_STACK_START == true)
962
  chEvtRegisterMaskWithFlags(&aos.events.io, &_eventListenerIO, IOEVENT_MASK, MODULE_SSSP_EVENTFLAGS_PD | MODULE_SSSP_EVENTFLAGS_SYNC | MODULE_SSSP_EVENTFLAGS_UP);
963
#elif (AMIROOS_CFG_SSSP_STACK_END == true)
964
  chEvtRegisterMaskWithFlags(&aos.events.io, &_eventListenerIO, IOEVENT_MASK, MODULE_SSSP_EVENTFLAGS_PD | MODULE_SSSP_EVENTFLAGS_SYNC | MODULE_SSSP_EVENTFLAGS_DN);
965
#else
966
  chEvtRegisterMaskWithFlags(&aos.events.io, &_eventListenerIO, IOEVENT_MASK, MODULE_SSSP_EVENTFLAGS_PD | MODULE_SSSP_EVENTFLAGS_SYNC | MODULE_SSSP_EVENTFLAGS_DN | MODULE_SSSP_EVENTFLAGS_UP);
960
  eventflagsmask |= MODULE_SSSP_EVENTFLAGS_PD | MODULE_SSSP_EVENTFLAGS_SYNC;
961
#if (AMIROOS_CFG_SSSP_STACK_START != true)
962
  eventflagsmask |= MODULE_SSSP_EVENTFLAGS_DN;
963
#endif
964
#if (AMIROOS_CFG_SSSP_STACK_END != true)
965
  eventflagsmask |= MODULE_SSSP_EVENTFLAGS_UP;
967 966
#endif
968 967
#endif /* AMIROOS_CFG_SSSP_ENABLE == true */
968
  if (eventflagsmask != 0) {
969
    chEvtRegisterMaskWithFlags(&aos.events.io, &_eventListenerIO, IOEVENT_MASK, eventflagsmask);
970
  }
969 971
  chEvtRegisterMask(&aos.events.os, &_eventListenerOS, OSEVENT_MASK);
970 972

  
971 973
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_5)

Also available in: Unified diff