SHARP Memory display library + Cortex M0/M3

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
neo2121
 
Posts: 3
Joined: Wed Jun 22, 2016 3:23 am

SHARP Memory display library + Cortex M0/M3

Post by neo2121 »

Hi Adafruit! I'm trying to get my Adafruit Sharp Memory Display Breakout to work with a 32bit board (I tried an M0 Feather and a STM32F1 based board as well). I'm using the Arduino IDE to program it and the Adafruit Library for the display but I keep getting these compile errors:

Code: Select all

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp: In constructor 'Adafruit_SharpMem::Adafruit_SharpMem(uint8_t, uint8_t, uint8_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:63:3: error: 'clkport' was not declared in this scope

   clkport     = portOutputRegister(digitalPinToPort(_clk));

   ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:64:3: error: 'clkpinmask' was not declared in this scope

   clkpinmask  = digitalPinToBitMask(_clk);

   ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:65:3: error: 'dataport' was not declared in this scope

   dataport    = portOutputRegister(digitalPinToPort(_mosi));

   ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:66:3: error: 'datapinmask' was not declared in this scope

   datapinmask = digitalPinToBitMask(_mosi);

   ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:69:3: error: '_sharpmem_vcom' was not declared in this scope

   _sharpmem_vcom = SHARPMEM_BIT_VCOM;

   ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp: In member function 'void Adafruit_SharpMem::sendbyte(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:96:6: error: 'clkport' was not declared in this scope

     *clkport &= ~clkpinmask;

      ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:96:18: error: 'clkpinmask' was not declared in this scope

     *clkport &= ~clkpinmask;

                  ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:99:8: error: 'dataport' was not declared in this scope

       *dataport |=  datapinmask;

        ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:99:21: error: 'datapinmask' was not declared in this scope

       *dataport |=  datapinmask;

                     ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:102:8: error: 'dataport' was not declared in this scope

       *dataport &= ~datapinmask;

        ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:102:21: error: 'datapinmask' was not declared in this scope

       *dataport &= ~datapinmask;

                     ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:111:4: error: 'clkport' was not declared in this scope

   *clkport &= ~clkpinmask;

    ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:111:16: error: 'clkpinmask' was not declared in this scope

   *clkport &= ~clkpinmask;

                ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp: In member function 'void Adafruit_SharpMem::sendbyteLSB(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:123:6: error: 'clkport' was not declared in this scope

     *clkport &= ~clkpinmask;

      ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:123:18: error: 'clkpinmask' was not declared in this scope

     *clkport &= ~clkpinmask;

                  ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:126:8: error: 'dataport' was not declared in this scope

       *dataport |=  datapinmask;

        ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:126:21: error: 'datapinmask' was not declared in this scope

       *dataport |=  datapinmask;

                     ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:129:8: error: 'dataport' was not declared in this scope

       *dataport &= ~datapinmask;

        ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:129:21: error: 'datapinmask' was not declared in this scope

       *dataport &= ~datapinmask;

                     ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:137:4: error: 'clkport' was not declared in this scope

   *clkport &= ~clkpinmask;

    ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:137:16: error: 'clkpinmask' was not declared in this scope

   *clkport &= ~clkpinmask;

                ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp: In member function 'virtual void Adafruit_SharpMem::drawPixel(int16_t, int16_t, uint16_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:164:14: error: 'swap' was not declared in this scope

     swap(x, y);

              ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp: In member function 'uint8_t Adafruit_SharpMem::getPixel(uint16_t, uint16_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:204:14: error: 'swap' was not declared in this scope

     swap(x, y);

              ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp: In member function 'void Adafruit_SharpMem::clearDisplay()':

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:231:12: error: '_sharpmem_vcom' was not declared in this scope

   sendbyte(_sharpmem_vcom | SHARPMEM_BIT_CLEAR);

            ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp: In member function 'void Adafruit_SharpMem::refresh()':

C:\Program Files (x86)\Arduino\libraries\Adafruit_SHARP_Memory_Display-master\Adafruit_SharpMem.cpp:249:36: error: '_sharpmem_vcom' was not declared in this scope

   sendbyte(SHARPMEM_BIT_WRITECMD | _sharpmem_vcom);

                                    ^
Having browsed the forum and the web it seems the Sharp Memory Display library was written with an 8bit AVR in mind, but judging from similar modifications made to make these kind of libraries work with other types of boards it seems it would pretty simple to port it for ARM processors. However I'm not an expert at C++ or ARM processors.

Could you guys take a look at it and see if it can be made to work with Cortex M0/M3 boards?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: SHARP Memory display library + Cortex M0/M3

Post by adafruit_support_mike »

We have a team working their way through out libraries and updating them, but there are a couple hundred of them. There's no ETA.

User avatar
VibratoLLC
 
Posts: 1
Joined: Sun Aug 28, 2016 1:50 pm

Re: SHARP Memory display library + Cortex M0/M3

Post by VibratoLLC »

Teensy Compiling Errors.txt
Errors for Teensy
(11.48 KiB) Downloaded 225 times
I am having the same/similar issue using the Teensy LC board, with identical errors.
Sure is BANNED buying the parts from Adafruit (Sharp Memory Display and BME280 Sensor) and not being able to use them!
Any recommendations would be appreciated!

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: SHARP Memory display library + Cortex M0/M3

Post by Franklin97355 »

Any recommendations would be appreciated!
The datasheets for both devices are available for you to read and write code for any processor you want. Also I would check on the sites that make the processors you are using to see if anyone has written code you can use.

jschnurr
 
Posts: 9
Joined: Tue Jul 08, 2014 6:36 pm

Re: SHARP Memory display library + Cortex M0/M3

Post by jschnurr »

I modified the Adafruit library to use hardware SPI. It now works for me on the M0/M3.

viewtopic.php?f=25&t=105085

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”