Subversion Repositories chibiosIgnition

Rev

Rev 16 | Rev 19 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16 Rev 18
Line 83... Line 83...
83
static msg_t Thread1(void *arg) {
83
static msg_t Thread1(void *arg) {
84
 
84
 
85
        (void) arg;
85
        (void) arg;
86
        chRegSetThreadName("PLL ");
86
        chRegSetThreadName("PLL ");
87
        while (TRUE) {
87
        while (TRUE) {
88
                sampIndex = getNextRefPulseIndex();
-
 
89
if(slowPulse() == 0)
-
 
90
                processNextPulse(sampIndex);
88
                chThdSleep(TIME_INFINITE);
91
 
89
 
92
        }
90
        }
93
        return 0;
91
        return 0;
94
}
92
}
95
 
93
 
Line 156... Line 154...
156
   * Initializes a serial-over-USB CDC driver.
154
   * Initializes a serial-over-USB CDC driver.
157
   */
155
   */
158
  sduObjectInit(&SDU1);
156
  sduObjectInit(&SDU1);
159
  sduStart(&SDU1, &serusbcfg);
157
  sduStart(&SDU1, &serusbcfg);
160
 
158
 
-
 
159
#if  HAL_USE_USB_DUAL_CDC == TRUE
-
 
160
  sduObjectInit(&SDU2);
-
 
161
  sduStart(&SDU2, &serusbcfg2);
-
 
162
#endif
-
 
163
 
161
  /*
164
  /*
162
   * Activates the USB driver and then the USB bus pull-up on D+.
165
   * Activates the USB driver and then the USB bus pull-up on D+.
163
   * Note, a delay is inserted in order to not have to disconnect the cable
166
   * Note, a delay is inserted in order to not have to disconnect the cable
164
   * after a reset.
167
   * after a reset.
165
   */
168
   */
166
  usbDisconnectBus(serusbcfg.usbp);
169
  usbDisconnectBus(serusbcfg.usbp);
167
  chThdSleepMilliseconds(1000);
170
  chThdSleepMilliseconds(1000);
168
  usbStart(serusbcfg.usbp, &usbcfg);
171
  usbStart(serusbcfg.usbp, &usbcfg);
-
 
172
#if HAL_USE_USB_DUAL_CDC == TRUE
-
 
173
  usbStart(serusbcfg2.usbp, &usbcfg);
-
 
174
#endif
169
  usbConnectBus(serusbcfg.usbp);
175
  usbConnectBus(serusbcfg.usbp);
170
#else
176
#else
171
  /*
177
  /*
172
   * Initializes serial port.
178
   * Initializes serial port.
173
   */
179
   */