Rev 10 | Rev 13 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10 | Rev 11 | ||
---|---|---|---|
Line 115... | Line 115... | ||
115 | static const ShellCommand commands[] = { { "mem", cmd_mem }, { "threads", |
115 | static const ShellCommand commands[] = { { "mem", cmd_mem }, { "threads", |
116 | cmd_threads }, { "test", cmd_test }, { NULL, NULL } }; |
116 | cmd_threads }, { "test", cmd_test }, { NULL, NULL } }; |
117 | 117 | ||
118 | static const ShellConfig shell_cfg1 = { (BaseChannel *) &SDU1, commands }; |
118 | static const ShellConfig shell_cfg1 = { (BaseChannel *) &SDU1, commands }; |
119 | 119 | ||
120 | /* |
- | |
121 | * Red LEDs blinker thread, times are in milliseconds. |
- | |
122 | */ |
- | |
123 | uint16_t sampleVal; |
120 | uint16_t sampleVal; |
124 | 121 | ||
125 | static THD_WORKING_AREA(waThread1, 512); |
122 | static THD_WORKING_AREA(waThread1, 512); |
126 | static msg_t Thread1(void *arg) { |
123 | static msg_t Thread1(void *arg) { |
127 | 124 | ||
128 | (void) arg; |
125 | (void) arg; |
129 | chRegSetThreadName("PLL "); |
126 | chRegSetThreadName("PLL "); |
130 | while (TRUE) { |
127 | while (TRUE) { |
131 | sampleVal = getNextPulse(); |
128 | sampleVal = getNextPulse(); |
132 | 129 | ||
133 | chThdSleep(1000); |
130 | processNextPulse(sampleVal); |
- | 131 | ||
134 | } |
132 | } |
135 | return 0; |
133 | return 0; |
136 | } |
134 | } |
137 | 135 | ||
138 | /* |
136 | /* |
Line 226... | Line 224... | ||
226 | 224 | ||
227 | font_gotoxy(0,0); |
225 | font_gotoxy(0,0); |
228 | 226 | ||
229 | print_digits(64, 16, 4, 1, adv); |
227 | print_digits(64, 16, 4, 1, adv); |
230 | 228 | ||
231 | print_digits(64, 33, 4,-1, spd); |
229 | print_digits(64, 33, 4,-1, getRPM()); |
232 | print_scaled_string("RPM:",0,33,4,256); |
230 | print_scaled_string("RPM:",0,33,4,256); |
233 | print_scaled_string("ADV:",0,16,4,256); |
231 | print_scaled_string("ADV:",0,16,4,256); |
234 | 232 | ||
235 | font_gotoxy(0,0); |
233 | font_gotoxy(0,0); |
236 | font_puts("count:"); |
234 | font_puts("count:"); |
237 | font_sig_digits(64, 0,1,-1, sampleVal); |
235 | font_sig_digits(64, 0,1,-1, sampleVal); |
238 | 236 | ||
- | 237 | font_sig_digits(64,52,4,-1, getDelta()); |
|
- | 238 | ||
239 | 239 | ||
240 | display(); |
240 | display(); |
241 | 241 | ||
242 | chMtxUnlock(&mutexDisplay); |
242 | chMtxUnlock(&mutexDisplay); |
243 | // |
243 | // |