Changeset 10910 for firmware/FSC/src/output.c
- Timestamp:
- 06/05/11 17:40:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/output.c
r10697 r10910 7 7 void print_status() { 8 8 usart_write_str((pU08)"adc status:\n"); 9 for (U08 i=0; i< VOLTAGE_ CHANNELS/8;++i) {9 for (U08 i=0; i< VOLTAGE_REGS;++i) { 10 10 usart_write_U08_bin(adc_enables[i]); 11 11 usart_write_char(' '); 12 12 } 13 usart_write_c har('\n');14 for (U08 i=0; i< VOLTAGE_ CHANNELS/8;++i){13 usart_write_crlf(); 14 for (U08 i=0; i< VOLTAGE_REGS;++i){ 15 15 usart_write_U08_bin(adc_channels_ready[i]); 16 16 usart_write_char(' '); 17 17 } 18 usart_write_c har('\n');18 usart_write_crlf(); 19 19 20 20 usart_write_str((pU08)"ad7719 status:\n"); … … 23 23 usart_write_char(' '); 24 24 } 25 usart_write_c har('\n');25 usart_write_crlf(); 26 26 for (U08 i=0; i< RESISTANCE_CHANNELS/8;++i){ 27 27 usart_write_U08_bin(ad7719_channels_ready[i]); 28 28 usart_write_char(' '); 29 29 } 30 usart_write_c har('\n');30 usart_write_crlf(); 31 31 32 32 usart_write_str((pU08)"time:"); 33 33 usart_write_U32(sec,10); 34 34 usart_write_str((pU08)" sec.\n"); 35 35 /* 36 36 usart_write_str((pU08)"adc measured all: "); 37 37 if (adc_measured_all) … … 48 48 usart_write_str((pU08)"adc current channel:"); 49 49 usart_write_U08(*adc_current_channel,2); 50 usart_write_c har('\n');50 usart_write_crlf(); 51 51 52 52 usart_write_str((pU08)"ad7719 current channel:"); 53 53 usart_write_U08(*ad7719_current_channel,2); 54 usart_write_char('\n'); 55 54 usart_write_crlf(); 55 56 usart_write_str((pU08)"mux SB:"); 57 usart_write_U08_hex(PORTC); 58 usart_write_str((pU08)" SA:"); 59 usart_write_U08_hex(PORTA); 60 usart_write_crlf(); 61 */ 56 62 } 57 63 void print_adc_nicely() { … … 92 98 usart_write_str((pU08)" "); 93 99 } else { 94 usart_write_str((pU08)" 100 usart_write_str((pU08)" "); 95 101 } 96 102 //usart_write_char('\n'); … … 114 120 } 115 121 116 void adc_output(U08 channel, U 08data) {122 void adc_output(U08 channel, U16 data) { 117 123 118 124 // if (channel < 40) … … 167 173 //usart_write_U08(channel,2); // Numbers 1...8 168 174 usart_write_char(':'); 169 usart_write_U16( (U16)data*16, 4); //data175 usart_write_U16(data/(adc_readings_until_mean/4), 7); //data 170 176 } 171 177 … … 182 188 w5100_set_TX(eth_write_buffer, 2); 183 189 } 190 191 void print_help(){ 192 usart_write_str((pU08)"printing help: -not yet- \n"); 193 } 194 195 void print_adc_stupid() { 196 usart_write_str((pU08)"printing voltages in mV - stupid mode:\n"); 197 for (U08 i = 0 ; i < VOLTAGE_CHANNELS ; ++i) { 198 usart_write_str((pU08)"ch:"); 199 usart_write_U08(i,3); 200 usart_write_char(' '); 201 usart_write_U16_hex(adc_values[i]); 202 usart_write_char(' '); 203 usart_write_U16(adc_values[i],7); 204 usart_write_crlf(); 205 } 206 usart_write_char('\n'); 207 }
Note:
See TracChangeset
for help on using the changeset viewer.