We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Please help me to solve this problem.I am trying to use EC166 compiler with RTX tiny.here is my rtx.c file
#include <stdio.h> #include <rtx166t.h> /* RTX-166 tiny functions & defines */ #include <reg167.h> #include "ADC.h" int counter0; /* counter for task 0 */ ADC *adc_object0; void job0 (void) _task 0 { os_create_task (1); /* start task 1 */ while (1) { /* endless loop */ counter0++; /* increment counter 0 */ os_wait (K_TMO, 5, 0); /* wait for timeout: 5 ticks */ } } void job1 (void) _task 1 { while (1) { /* endless loop */ x = adc_object0->read(); os_wait (K_TMO, 10, 0); /* wait for timeout: 10 ticks */ } }
class ADC { // ADC base class public: void init (); };
#include <stdio.h> #include <Reg167.h> #include "ADC.h" void ADC::init () { printf("Hello \n"); }
It sounds like the file is being compiled by the C compiler. Have you tried changing the extension to .CPP? Jon