tp-freeforall / prod

TinyOS (less academic, more industrial, rD, less filling), still a floor wax
BSD 3-Clause "New" or "Revised" License
82 stars 37 forks source link

x2xx MCUs do not have ADC12ENC in header file #23

Closed andresv closed 11 years ago

andresv commented 11 years ago

tos/chips/msp430/adc12/HplAdc12P uses ADC12ENC, however for example msp430f2418 has just ENC in header definition.

/* ADC12CTL0 */

define ADC12SC (0x001) /* ADC12 Start Conversion */

define ENC (0x002) /* ADC12 Enable Conversion */

define ADC12TOVIE (0x004) /* ADC12 Timer Overflow interrupt enable */

So this should be somehow universally sorted out.

cire831 commented 11 years ago

what toolchain are you using?

In particular what version of msp430mcu do you have installed?

andresv commented 11 years ago

Toolchain is taken sometime ago from: http://tinyprod.net/repos/debian/README-46.html

apt-show-versions msp430mcu-46
msp430mcu-46/msp430-46 upgradeable from 20120406-LTS20120406+20120502 to 20120406-LTS20120406+20120502-tinyprod
cire831 commented 11 years ago

how about "dpkg -l msp430mcu-46"

The above shows you what versions are available.

but given what you have shouldn't make a difference. I'll figure it out. thanks.

cire831 commented 11 years ago

Also a test case that I can compile would be helpful. I need the test case to fail.

cire831 commented 11 years ago

The above should fix it for all ADC12 cpus that don't define ADC12ENC.

Try it out and let me know. And I'll close the issue.

andresv commented 11 years ago

Got 2 more undefined symbols:

`ADC12CONSEQ0' undeclared (first use in this function)
`ADC12CONSEQ1' undeclared (first use in this function)

In msp430f2418.h they are defined as:

#define CONSEQ0             (0x0002)    /* ADC12 Conversion Sequence Select 0 */
#define CONSEQ1             (0x0004)    /* ADC12 Conversion Sequence Select 1 */
cire831 commented 11 years ago

that's why it would have been good to have a test case i can run.