Subversion Repositories chibiosIgnition

Rev

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

Rev 11 Rev 13
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
uint16_t sampleVal;
120
uint16_t sampIndex;
121
 
121
 
122
static THD_WORKING_AREA(waThread1, 512);
122
static THD_WORKING_AREA(waThread1, 512);
123
static msg_t Thread1(void *arg) {
123
static msg_t Thread1(void *arg) {
124
 
124
 
125
        (void) arg;
125
        (void) arg;
126
        chRegSetThreadName("PLL ");
126
        chRegSetThreadName("PLL ");
127
        while (TRUE) {
127
        while (TRUE) {
128
                sampleVal = getNextPulse();
128
                sampIndex = getNextRefPulseIndex();
129
 
129
 
130
                processNextPulse(sampleVal);
130
                processNextPulse(sampIndex);
131
 
131
 
132
        }
132
        }
133
        return 0;
133
        return 0;
134
}
134
}
135
 
135
 
Line 230... Line 230...
230
    print_scaled_string("RPM:",0,33,4,256);
230
    print_scaled_string("RPM:",0,33,4,256);
231
    print_scaled_string("ADV:",0,16,4,256);
231
    print_scaled_string("ADV:",0,16,4,256);
232
 
232
 
233
    font_gotoxy(0,0);
233
    font_gotoxy(0,0);
234
    font_puts("count:");
234
    font_puts("count:");
235
    font_sig_digits(64, 0,1,-1, sampleVal);
235
    font_sig_digits(64, 0,1,-1,  getCount());
236
 
236
 
237
    font_sig_digits(64,52,4,-1,  getDelta());
237
    font_sig_digits(64,52,4,-1,  getDelta());
238
 
238
 
239
 
239
 
240
         display();
240
         display();