Revision ba516b61 os/core/src/main.c

View differences:

os/core/src/main.c
42 42

  
43 43
#if defined(MODULE_HAL_PROGIF) || defined(__DOXYGEN__)
44 44
/**
45
 * @brief   SSM output for the programmer interface.
45
 * @brief   I/O channel for the programmer interface.
46 46
 */
47
static ssm_output_t _ssmProgIfOutput;
47
static AosIOChannel _stdiochannel;
48

  
49
/**
50
 * @brief   I/O shell channel for the programmer interface.
51
 */
52
static AosShellChannel _stdshellchannel;
48 53
#endif
49 54

  
50 55
/**
......
135 140
#if defined(MODULE_INIT_TESTS)
136 141
  MODULE_INIT_TESTS();
137 142
#else
138
  #warning "MODULE_INIT_TESTS no defined"
143
  #warning "MODULE_INIT_TESTS not defined"
139 144
#endif
140 145
#endif
141 146

  
......
168 173
#endif
169 174
  // user interface (if any)
170 175
#ifdef MODULE_HAL_PROGIF
171
  ssmOutputInit(&_ssmProgIfOutput, (BaseSequentialStream*)&MODULE_HAL_PROGIF);
172
  ssmAddOutput(aos.ssm, &_ssmProgIfOutput);
173
  ssmEnableOutput(aos.ssm, _ssmProgIfOutput.stream);
174
  ssmSetInput(aos.ssm, (BaseSequentialStream*)&MODULE_HAL_PROGIF);
176
  aosIOChannelInit(&_stdiochannel, (BaseAsynchronousChannel*)&MODULE_HAL_PROGIF);
177
  aosIOChannelOutputEnable(&_stdiochannel);
178
  aosIOStreamAddChannel(&aos.iostream, &_stdiochannel);
179
#if (AMIROOS_CFG_SHELL_ENABLE == true)
180
  aosShellChannelInit(&_stdshellchannel, &_stdiochannel);
181
  aosShellChannelInputEnable(&_stdshellchannel);
182
  aosShellChannelOutputEnable(&_stdshellchannel);
183
  aosShellStreamAddChannel(&aos.shell->stream, &_stdshellchannel);
184
#endif
175 185
#endif
176 186

  
177 187
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_6)

Also available in: Unified diff