0

#error "Board type unsupported / not recognized"
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

#error "Board type unsupported / not recognized"

by Munrra on Thu Jul 25, 2019 12:05 pm

Hello Im programming a camera ov7670, bluetooth and arduino. And I having a problem when It's runing.

this is the code:
Code: Select all | TOGGLE FULL SIZE
#include <YATFT.h>
#include <util/yacam.h>
#include <util/yacodec.h>
#include <util/yasrl.h>
#include "ov7670_regs.h"

JPEG_DECODE  jpeg_decode;

YATFT  tft(0);
INTRFC ifc;
CAM    cam;
CODEC  codec;
SRL    srl;

#define IMG_SizeX    320
#define IMG_SizeY    240

uint8_t   mode = 0;
uint8_t   last_mode = 0;
uint8_t   start_capt = 0;
uint16_t  err;

void setup()
{
    // initialize the serial port
    Serial.begin(115200);

    // initialize the display
    tft.begin();

    tft.SetColor(BRIGHTRED);
    tft.ClearDevice();
}

void loop()
{
    // put your main code here, to run repeatedly:
    if (Serial.available())
    {
        uint8_t temp = Serial.read();

        switch (temp)
        {
            case 0x10: // Send single Photo
                 mode = 1;
                 start_capt = 1;
                 if (last_mode != mode && last_mode != 2) {
                     tft.begin();
                     tft.SetRGB();               // Switch to RGB mode
                     cam.CamInit(&OV7670_QVGA[0][0]);
                     cam.CamVideoPreview(0, 0, 1, true);
                     codec.JPEGInit();
                     codec.JPEGSetRegs(IMG_SizeX, IMG_SizeY);
                     delay(1000);
                 }
                 break;
            case 0x20: // Continuous send Photo
                 mode = 2;
                 start_capt = 2;
                 if (last_mode != mode && last_mode != 1) {
                     tft.begin();
                     tft.SetRGB();               // Switch to RGB mode
                     cam.CamInit(&OV7670_QVGA[0][0]);
                     cam.CamVideoPreview(0, 0, 1, true);
                     codec.JPEGInit();
                     codec.JPEGSetRegs(IMG_SizeX, IMG_SizeY);
                 }
                 break;
            case 0x30: // Receive single Photo
                 mode = 3;
                 start_capt = 3;
                 if (last_mode != mode && last_mode != 4) {
                     tft.begin();
                     tft.SetYUV();               // Switch to YUV mode
                 }
                 break;
            case 0x40: // Continuous receive Photo
                 mode = 4;
                 start_capt = 4;
                 if (last_mode != mode && last_mode != 3) {
                     tft.begin();
                     tft.SetYUV();               // Switch to YUV mode
                 }
                 break;
            default:
                 break;
        }
    }
    if (mode == 1) // Send single Photo
    {
        if (start_capt == 1)
        {
            start_capt = 0;
            last_mode = mode;
            mode = 0;
            CamCapture();
        }
    }
    else if (mode == 2) // Continuous send Photo
    {
        while (1)
        {
            uint8_t temp = Serial.read();
            if (start_capt == 2)
            {
                start_capt = 0;
            }       
            if (temp == 0x21) // Stop ?
            {
                start_capt = 0;
                last_mode = mode;
                mode = 0;
                break;
            }
            if (CamCapture()) continue;
        }
    }
    else if (mode == 3) // Receive single Photo
    {
        if (start_capt == 3)
        {
            //Start capture
            start_capt = 0;
            last_mode = mode;
            mode = 0;
            Serial.print("!");
            srl.JPEGReadFromSerial(&jpeg_decode,  // jpeg decode structure
                                              0,  // x0 (left)
                                              0,  // y0 (top)
                                    GetMaxX()+1,  // x1 (right)
                                    GetMaxY()+1,  // y1 (bottom)
                                        32000); // max image size
            }
    }
    else if (mode == 4) // Continuous receive Photo
    {
        uint8_t temp = Serial.read();
        while (1)
        {
            if (start_capt == 4)
            {
                //Start capture
                start_capt = 0;
            }
            if (temp == 0x41) // Stop ?
            {
                start_capt = 0;
                last_mode = mode;
                mode = 0;
                break;
            }
            Serial.print("!");
            srl.JPEGReadFromSerial(&jpeg_decode,  // jpeg decode structure
                                              0,  // x0 (left)
                                              0,  // y0 (top)
                                    GetMaxX()+1,  // x1 (right)
                                    GetMaxY()+1,  // y1 (bottom)
                                         32000); // max image size
        }
    }
}

uint8_t  CamCapture(void)
{
    uint8_t temp = 0xff, temp_last = 0;
    bool is_header = false;
    uint32_t length = 0;
    length = codec.JPEGStart();
    uint32_t en_jpeg_address = ifc.rdReg32(0x414)<<2;
    int k = 0;
               
    if ((length >= 0x5FFFF) | (length == 0))
    {
        start_capt = 2;
        return 1;
    }
    temp = ifc.GetMem(en_jpeg_address+k);
    k++;
    length --;
    while ( length-- )
    {
        temp_last = temp;
        temp = ifc.GetMem(en_jpeg_address+k);
        k++;
        if (is_header == true)
        {
            Serial.write(temp);
        }
        else if ((temp == 0xD8) & (temp_last == 0xFF))
        {
            is_header = true;
            Serial.write(temp_last);
            Serial.write(temp);
        }
        if ( (temp == 0xD9) && (temp_last == 0xFF) ) //If find the end ,break while,
            break;
    }
    is_header = false;
    return 0;
}


Message Error:
Code: Select all | TOGGLE FULL SIZE
Arduino:1.8.9 (Windows 7), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:17:0:

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:281:3: error: #error "Board type unsupported / not recognized"

  #error "Board type unsupported / not recognized"

   ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::wrReg8(uint16_t, uint8_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:285:64: error: 'WR_CD_ACTIVE' was not declared in this scope

 #define wrReg8inline(a, d)     {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);WR_IDLE;}

                                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:556:48: note: in expansion of macro 'wrReg8inline'

     void        wrReg8(uint16_t a, uint8_t d) {wrReg8inline(a, d);};

                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:285:77: error: 'RD_IDLE' was not declared in this scope

 #define wrReg8inline(a, d)     {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);WR_IDLE;}

                                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:556:48: note: in expansion of macro 'wrReg8inline'

     void        wrReg8(uint16_t a, uint8_t d) {wrReg8inline(a, d);};

                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:285:93: error: 'write8' was not declared in this scope

 #define wrReg8inline(a, d)     {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);WR_IDLE;}

                                                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:556:48: note: in expansion of macro 'wrReg8inline'

     void        wrReg8(uint16_t a, uint8_t d) {wrReg8inline(a, d);};

                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:285:117: error: 'CD_DATA' was not declared in this scope

 #define wrReg8inline(a, d)     {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);WR_IDLE;}

                                                                                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:556:48: note: in expansion of macro 'wrReg8inline'

     void        wrReg8(uint16_t a, uint8_t d) {wrReg8inline(a, d);};

                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:285:135: error: 'WR_IDLE' was not declared in this scope

 #define wrReg8inline(a, d)     {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);WR_IDLE;}

                                                                                                                                       ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:556:48: note: in expansion of macro 'wrReg8inline'

     void        wrReg8(uint16_t a, uint8_t d) {wrReg8inline(a, d);};

                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::wrReg16(uint16_t, uint16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:286:64: error: 'WR_CD_ACTIVE' was not declared in this scope

 #define wrReg16inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);WR_IDLE;}

                                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:559:50: note: in expansion of macro 'wrReg16inline'

     void        wrReg16(uint16_t a, uint16_t d) {wrReg16inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:286:77: error: 'RD_IDLE' was not declared in this scope

 #define wrReg16inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);WR_IDLE;}

                                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:559:50: note: in expansion of macro 'wrReg16inline'

     void        wrReg16(uint16_t a, uint16_t d) {wrReg16inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:286:93: error: 'write8' was not declared in this scope

 #define wrReg16inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);WR_IDLE;}

                                                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:559:50: note: in expansion of macro 'wrReg16inline'

     void        wrReg16(uint16_t a, uint16_t d) {wrReg16inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:286:117: error: 'CD_DATA' was not declared in this scope

 #define wrReg16inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);WR_IDLE;}

                                                                                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:559:50: note: in expansion of macro 'wrReg16inline'

     void        wrReg16(uint16_t a, uint16_t d) {wrReg16inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:286:148: error: 'WR_IDLE' was not declared in this scope

 #define wrReg16inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);WR_IDLE;}

                                                                                                                                                    ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:559:50: note: in expansion of macro 'wrReg16inline'

     void        wrReg16(uint16_t a, uint16_t d) {wrReg16inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::wrReg32(uint16_t, uint32_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:287:64: error: 'WR_CD_ACTIVE' was not declared in this scope

 #define wrReg32inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);write8(d>>16);write8(d>>24);WR_IDLE;}

                                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:562:50: note: in expansion of macro 'wrReg32inline'

     void        wrReg32(uint16_t a, uint32_t d) {wrReg32inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:287:77: error: 'RD_IDLE' was not declared in this scope

 #define wrReg32inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);write8(d>>16);write8(d>>24);WR_IDLE;}

                                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:562:50: note: in expansion of macro 'wrReg32inline'

     void        wrReg32(uint16_t a, uint32_t d) {wrReg32inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:287:93: error: 'write8' was not declared in this scope

 #define wrReg32inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);write8(d>>16);write8(d>>24);WR_IDLE;}

                                                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:562:50: note: in expansion of macro 'wrReg32inline'

     void        wrReg32(uint16_t a, uint32_t d) {wrReg32inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:287:117: error: 'CD_DATA' was not declared in this scope

 #define wrReg32inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);write8(d>>16);write8(d>>24);WR_IDLE;}

                                                                                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:562:50: note: in expansion of macro 'wrReg32inline'

     void        wrReg32(uint16_t a, uint32_t d) {wrReg32inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:287:176: error: 'WR_IDLE' was not declared in this scope

 #define wrReg32inline(a, d)    {uint8_t hi,lo;hi=(a)>>8;lo=(a);WR_CD_ACTIVE;RD_IDLE;write8(0);write8(hi);write8(lo);CD_DATA;write8(d);write8(d>>8);write8(d>>16);write8(d>>24);WR_IDLE;}

                                                                                                                                                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:562:50: note: in expansion of macro 'wrReg32inline'

     void        wrReg32(uint16_t a, uint32_t d) {wrReg32inline(a, d);};

                                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::setReadDir()':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:568:53: error: 'setReadDirInline' was not declared in this scope

     void        setReadDir(void) { setReadDirInline();};

                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::setWriteDir()':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:571:55: error: 'setWriteDirInline' was not declared in this scope

     void        setWriteDir(void) { setWriteDirInline();};

                                                       ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'uint8_t INTRFC::read8fn()':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:574:67: error: 'read8inline' was not declared in this scope

     uint8_t     read8fn(void) { uint8_t result; read8inline(result); return result;};

                                                                   ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'uint8_t INTRFC::readport8fn()':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:578:75: error: 'readport8inline' was not declared in this scope

     uint8_t     readport8fn(void) { uint8_t result; readport8inline(result); return result;};

                                                                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::SetAddress(uint32_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:584:43: error: 'WR_CD_ACTIVE' was not declared in this scope

     void        SetAddress(uint32_t  r) { WR_CD_ACTIVE; RD_IDLE; write8(0x80|(r)>>16); write8((r)>>8); write8(r); WR_IDLE;};

                                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:584:57: error: 'RD_IDLE' was not declared in this scope

     void        SetAddress(uint32_t  r) { WR_CD_ACTIVE; RD_IDLE; write8(0x80|(r)>>16); write8((r)>>8); write8(r); WR_IDLE;};

                                                         ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:584:85: error: 'write8' was not declared in this scope

     void        SetAddress(uint32_t  r) { WR_CD_ACTIVE; RD_IDLE; write8(0x80|(r)>>16); write8((r)>>8); write8(r); WR_IDLE;};

                                                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:584:115: error: 'WR_IDLE' was not declared in this scope

     void        SetAddress(uint32_t  r) { WR_CD_ACTIVE; RD_IDLE; write8(0x80|(r)>>16); write8((r)>>8); write8(r); WR_IDLE;};

                                                                                                                   ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::WriteData(uint16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:585:41: error: 'WR_ACTIVE' was not declared in this scope

     void        WriteData(uint16_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>8); write8(v); WR_IDLE;};

                                         ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:585:52: error: 'RD_CD_IDLE' was not declared in this scope

     void        WriteData(uint16_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>8); write8(v); WR_IDLE;};

                                                    ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:585:77: error: 'write8' was not declared in this scope

     void        WriteData(uint16_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>8); write8(v); WR_IDLE;};

                                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:585:91: error: 'WR_IDLE' was not declared in this scope

     void        WriteData(uint16_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>8); write8(v); WR_IDLE;};

                                                                                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void INTRFC::WriteData32(uint32_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:586:43: error: 'WR_ACTIVE' was not declared in this scope

     void        WriteData32(uint32_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>24); write8((v)>>16); write8((v)>>8); write8(v); WR_IDLE;};

                                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:586:54: error: 'RD_CD_IDLE' was not declared in this scope

     void        WriteData32(uint32_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>24); write8((v)>>16); write8((v)>>8); write8(v); WR_IDLE;};

                                                      ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:586:80: error: 'write8' was not declared in this scope

     void        WriteData32(uint32_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>24); write8((v)>>16); write8((v)>>8); write8(v); WR_IDLE;};

                                                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:586:127: error: 'WR_IDLE' was not declared in this scope

     void        WriteData32(uint32_t v) { WR_ACTIVE; RD_CD_IDLE; write8((v)>>24); write8((v)>>16); write8((v)>>8); write8(v); WR_IDLE;};

                                                                                                                               ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In constructor 'YATFT::YATFT(uint8_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:606:24: error: 'OUT_DIR_SIGNAL' was not declared in this scope

     YATFT(uint8_t d) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                        ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:606:40: error: 'CD_DATA' was not declared in this scope

     YATFT(uint8_t d) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                        ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:606:49: error: 'CS_IDLE' was not declared in this scope

     YATFT(uint8_t d) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                                 ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:606:58: error: 'RD_IDLE' was not declared in this scope

     YATFT(uint8_t d) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                                          ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:606:67: error: 'WR_IDLE' was not declared in this scope

     YATFT(uint8_t d) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                                                   ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:606:76: error: 'RST_IDLE' was not declared in this scope

     YATFT(uint8_t d) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                                                            ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In constructor 'YATFT::YATFT()':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:607:19: error: 'OUT_DIR_SIGNAL' was not declared in this scope

     YATFT(void) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                   ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:607:35: error: 'CD_DATA' was not declared in this scope

     YATFT(void) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                   ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:607:44: error: 'CS_IDLE' was not declared in this scope

     YATFT(void) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                            ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:607:53: error: 'RD_IDLE' was not declared in this scope

     YATFT(void) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT.cpp: In member function 'uint16_t YATFT::OutTextXY(int16_t, int16_t, char*)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT.cpp:461:27: warning: invalid conversion from 'char*' to 'unsigned char*' [-fpermissive]

     if (OutText(textString) == 0) { return 0;}

                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:607:62: error: 'WR_IDLE' was not declared in this scope

     YATFT(void) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                                              ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT.cpp:392:11: note:   initializing argument 1 of 'uint16_t YATFT::OutText(unsigned char*)'

 uint16_t  YATFT::OutText(unsigned char* textString) {

           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:607:71: error: 'RST_IDLE' was not declared in this scope

     YATFT(void) { OUT_DIR_SIGNAL; CD_DATA; CS_IDLE; RD_IDLE; WR_IDLE; RST_IDLE; init();};

                                                                       ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void YATFT::reset()':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:611:30: error: 'WR_RD_CS_IDLE' was not declared in this scope

     void        reset(void) {WR_RD_CS_IDLE;RST_CD_ACTIVE;RST_ACTIVE;delay(20);RST_IDLE;delay(100);wrReg8(0xA2,0x01);delay(100);};

                              ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:611:44: error: 'RST_CD_ACTIVE' was not declared in this scope

     void        reset(void) {WR_RD_CS_IDLE;RST_CD_ACTIVE;RST_ACTIVE;delay(20);RST_IDLE;delay(100);wrReg8(0xA2,0x01);delay(100);};

                                            ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:611:58: error: 'RST_ACTIVE' was not declared in this scope

     void        reset(void) {WR_RD_CS_IDLE;RST_CD_ACTIVE;RST_ACTIVE;delay(20);RST_IDLE;delay(100);wrReg8(0xA2,0x01);delay(100);};

                                                          ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:611:79: error: 'RST_IDLE' was not declared in this scope

     void        reset(void) {WR_RD_CS_IDLE;RST_CD_ACTIVE;RST_ACTIVE;delay(20);RST_IDLE;delay(100);wrReg8(0xA2,0x01);delay(100);};

                                                                               ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h: In member function 'void YATFT::write8(uint8_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.h:670:59: error: 'write8inline' was not declared in this scope

     void        write8(uint8_t value) { write8inline(value);};

                                                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'void YATFT::PutPixel(int16_t, int16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:270:5: error: 'WR_CD_ACTIVE' was not declared in this scope

     WR_CD_ACTIVE; RD_IDLE; SetAddress(address); RD_CD_IDLE; WR_ACTIVE; WriteData(_color);

     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:270:19: error: 'RD_IDLE' was not declared in this scope

     WR_CD_ACTIVE; RD_IDLE; SetAddress(address); RD_CD_IDLE; WR_ACTIVE; WriteData(_color);

                   ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:270:49: error: 'RD_CD_IDLE' was not declared in this scope

     WR_CD_ACTIVE; RD_IDLE; SetAddress(address); RD_CD_IDLE; WR_ACTIVE; WriteData(_color);

                                                 ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:270:61: error: 'WR_ACTIVE' was not declared in this scope

     WR_CD_ACTIVE; RD_IDLE; SetAddress(address); RD_CD_IDLE; WR_ACTIVE; WriteData(_color);

                                                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'uint8_t INTRFC::rdReg8(uint16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:284:24: error: 'RD_IDLE' was not declared in this scope

     static  uint8_t x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r)>>8); write8(r);

                        ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:284:33: error: 'WR_CD_ACTIVE' was not declared in this scope

     static  uint8_t x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r)>>8); write8(r);

                                 ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:284:58: error: 'write8' was not declared in this scope

     static  uint8_t x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r)>>8); write8(r);

                                                          ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:285:5: error: 'RD_ACTIVE' was not declared in this scope

     RD_ACTIVE; setReadDir(); WR_CD_IDLE; read8(x); read8(x); RD_IDLE; setWriteDir(); return x;

     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:285:30: error: 'WR_CD_IDLE' was not declared in this scope

     RD_ACTIVE; setReadDir(); WR_CD_IDLE; read8(x); read8(x); RD_IDLE; setWriteDir(); return x;

                              ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'uint16_t INTRFC::rdReg16(uint16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:289:24: error: 'RD_IDLE' was not declared in this scope

     static WORD_VAL x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r) >> 8); write8(r);

                        ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:289:33: error: 'WR_CD_ACTIVE' was not declared in this scope

     static WORD_VAL x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r) >> 8); write8(r);

                                 ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:289:58: error: 'write8' was not declared in this scope

     static WORD_VAL x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r) >> 8); write8(r);

                                                          ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:290:5: error: 'RD_ACTIVE' was not declared in this scope

     RD_ACTIVE; setReadDir(); WR_CD_IDLE; read8(x.v[0]); read8(x.v[0]); read8(x.v[1]);

     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:290:30: error: 'WR_CD_IDLE' was not declared in this scope

     RD_ACTIVE; setReadDir(); WR_CD_IDLE; read8(x.v[0]); read8(x.v[0]); read8(x.v[1]);

                              ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'uint32_t INTRFC::rdReg32(uint16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:295:25: error: 'RD_IDLE' was not declared in this scope

     static DWORD_VAL x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r) >> 8); write8(r);

                         ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:295:34: error: 'WR_CD_ACTIVE' was not declared in this scope

     static DWORD_VAL x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r) >> 8); write8(r);

                                  ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:295:59: error: 'write8' was not declared in this scope

     static DWORD_VAL x; RD_IDLE; WR_CD_ACTIVE; write8(0x00); write8((r) >> 8); write8(r);

                                                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:296:5: error: 'RD_ACTIVE' was not declared in this scope

     RD_ACTIVE;setReadDir(); WR_CD_IDLE; read8(x.v[0]); read8(x.v[0]); read8(x.v[1]);

     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:296:29: error: 'WR_CD_IDLE' was not declared in this scope

     RD_ACTIVE;setReadDir(); WR_CD_IDLE; read8(x.v[0]); read8(x.v[0]); read8(x.v[1]);

                             ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'void INTRFC::GetMemBuff(uint32_t, uint8_t*, uint16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:301:70: error: 'WR_CS_CD_IDLE' was not declared in this scope

     uint8_t  value;  uint16_t  i; SetAddress(address); setReadDir(); WR_CS_CD_IDLE; RD_CS_ACTIVE;

                                                                      ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:301:85: error: 'RD_CS_ACTIVE' was not declared in this scope

     uint8_t  value;  uint16_t  i; SetAddress(address); setReadDir(); WR_CS_CD_IDLE; RD_CS_ACTIVE;

                                                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:302:36: error: 'CS_IDLE' was not declared in this scope

     for (i = 0; i < length; i++) { CS_IDLE; CS_IDLE; CS_ACTIVE; CS_ACTIVE; readport8(*buff); buff++;}

                                    ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:302:54: error: 'CS_ACTIVE' was not declared in this scope

     for (i = 0; i < length; i++) { CS_IDLE; CS_IDLE; CS_ACTIVE; CS_ACTIVE; readport8(*buff); buff++;}

                                                      ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:303:5: error: 'RD_CS_IDLE' was not declared in this scope

     RD_CS_IDLE; setWriteDir();

     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'uint8_t INTRFC::GetMem(uint32_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:308:5: error: 'CS_IDLE' was not declared in this scope

     CS_IDLE; CD_DATA; WR_IDLE; RD_ACTIVE; CS_ACTIVE;

     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:308:14: error: 'CD_DATA' was not declared in this scope

     CS_IDLE; CD_DATA; WR_IDLE; RD_ACTIVE; CS_ACTIVE;

              ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:308:23: error: 'WR_IDLE' was not declared in this scope

     CS_IDLE; CD_DATA; WR_IDLE; RD_ACTIVE; CS_ACTIVE;

                       ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:308:32: error: 'RD_ACTIVE' was not declared in this scope

     CS_IDLE; CD_DATA; WR_IDLE; RD_ACTIVE; CS_ACTIVE;

                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:308:43: error: 'CS_ACTIVE' was not declared in this scope

     CS_IDLE; CD_DATA; WR_IDLE; RD_ACTIVE; CS_ACTIVE;

                                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:310:14: error: 'RD_IDLE' was not declared in this scope

     CS_IDLE; RD_IDLE; setWriteDir(); return value;

              ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'void INTRFC::PutMemBuff(uint32_t, uint8_t*, uint16_t)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:314:56: error: 'RD_CD_IDLE' was not declared in this scope

     uint8_t  value;  uint16_t  i; SetAddress(address); RD_CD_IDLE; WR_ACTIVE;

                                                        ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:314:68: error: 'WR_ACTIVE' was not declared in this scope

     uint8_t  value;  uint16_t  i; SetAddress(address); RD_CD_IDLE; WR_ACTIVE;

                                                                    ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:315:48: error: 'write8' was not declared in this scope

     for (i = 0; i < length; i++) { write8(*buff); buff++;} WR_IDLE; CS_IDLE;

                                                ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:315:60: error: 'WR_IDLE' was not declared in this scope

     for (i = 0; i < length; i++) { write8(*buff); buff++;} WR_IDLE; CS_IDLE;

                                                            ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:315:69: error: 'CS_IDLE' was not declared in this scope

     for (i = 0; i < length; i++) { write8(*buff); buff++;} WR_IDLE; CS_IDLE;

                                                                     ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp: In member function 'uint16_t YATFT::OutTextXY(int16_t, int16_t, char*)':

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:463:27: warning: invalid conversion from 'char*' to 'unsigned char*' [-fpermissive]

     if (OutText(textString) == 0) { return 0;}

                           ^

C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\YATFT\YATFT2.cpp:394:11: note:   initializing argument 1 of 'uint16_t YATFT::OutText(unsigned char*)'

 uint16_t  YATFT::OutText(unsigned char* textString) {

           ^

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.
Librería inválida encontrada en C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\Arduino_STM32-master: No encontrado archivos de encabezado (.h) en C:\Users\CVC-ATM-S01-PC\Documents\Arduino\libraries\Arduino_STM32-master

Este informe podría contener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.



I have library installed.

What Im doing wrong?

Munrra
 
Posts: 5
Joined: Thu Jul 25, 2019 11:59 am

Re: #error "Board type unsupported / not recognized"

by adafruit_support_mike on Thu Jul 25, 2019 11:52 pm

Post the contents of the file 'YATFT2.h' between CODE tags and we'll see what's tripping the error.

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Re: #error "Board type unsupported / not recognized"

by Munrra on Fri Jul 26, 2019 7:58 am

hello, I donwnloaded of this web https://github.com/YATFT/YATFT

Munrra
 
Posts: 5
Joined: Thu Jul 25, 2019 11:59 am

Re: #error "Board type unsupported / not recognized"

by adafruit_support_mike on Sat Jul 27, 2019 12:19 am

The error is being caused by this line:

Code: Select all | TOGGLE FULL SIZE
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__) || defined(__AVR_ATmega8__)
which basically says the library only works with the Arduino Uno. It doesn't know about the Mega's ATmega2560.

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Re: #error "Board type unsupported / not recognized"

by Munrra on Sun Jul 28, 2019 9:30 am

So i have to look for YATFT mega2560 library?..... or modify this line?

Munrra
 
Posts: 5
Joined: Thu Jul 25, 2019 11:59 am

Re: #error "Board type unsupported / not recognized"

by adafruit_support_mike on Sun Jul 28, 2019 12:07 pm

Modifying the header won’t necessarily make the code run. The ATmega2560 has different registers and pin mappings than the ATmega328, and the code might make assumptions about the chip.

You’ll need to find a version of the library that’s Mega compatible, or to modify the code in the existing one to make it work.

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Re: #error "Board type unsupported / not recognized"

by Munrra on Mon Jul 29, 2019 8:07 am

Hello! adafruit_support_mike.... oks.... so I'l try to get YATFT Library to mega2560. Thanks so much!

Munrra
 
Posts: 5
Joined: Thu Jul 25, 2019 11:59 am

Please be positive and constructive with your questions and comments.