|
From: | Dan Roganti |
Subject: | Re: [avr-gcc-list] Problem with avr gcc compiler ? No warning of mixeddata types |
Date: | Sun, 19 Apr 2009 14:12:41 -0400 |
User-agent: | Thunderbird 2.0.0.21 (Windows/20090302) |
Weddington, Eric wrote: Here's the snippet;Then can you post the code snippet that should have caused a warning? //------------------------------------------------------------- //Variables uint16_t adc_value; //This is the required data type because the ADC result is 10bits wide uint8_t ch; uint8_t channel; uint16_t gp2ir[4]; //This is where I had the wrong data, uint8_t uint8_t button_state; uint8_t i; uint8_t dfreq; uint8_t Sensor_status; [snip] //------------------------------------------------------------- // ADC conversion complete service routine // The ADC generates 10bit binary value from the analog input. ISR(ADC_vect) { //get low byte first adc_value = ADCL; //get high byte next, shift high byte to add adc_value += (ADCH<<8); //store readings into buffer gp2ir[channel] = adc_value; //This is where the problem occurred } [snip] That would be nice to have, but I usually get stuck working on the next project than upgrading the programming environment. Perhaps this could be a good suggestion to add into the next upgrade for the avr-libc. I've been using the AVR family for 8bitters a long time now, and I plan to keep using these micro's.Besides the function that cause the "non-use" warning happens to be in a file which is linked containing all my VT100 functions. I don't use every vt100 escape code for each project - nor should I.That's what libraries are for. Perhaps you should build your own vt100 library. See the avr-libc manual for more information: <http://www.nongnu.org/avr-libc/user-manual/library.html> =Dan [ = http://www2.applegate.org/~ragooman/ ] |
[Prev in Thread] | Current Thread | [Next in Thread] |