Hello, Yes, it has been done for emulator. Atleast, I can see the .o object file for SPI under Runtime/build folder. I have to make a C interface for the SPI in library/SPI/ellduino_spi.h & .c files, just like I did modification for the serial communication in attached files. Such modification is required because the ctypes module cannot access the class member functions directly through the shared library. I can try testing them with emulator! When does it needed? BR, Asif. On Thu, Jul 3, 2014 at 1:14 PM, Pekka Nikander <pekka.nikander@xxxxxx> wrote: > The emulator has some SPI done, see SPIemu.h, SPI.cpp. I don't remember > what is the status. It is probably just on the physical layer, most > probably the library is not compiled in, but I just don't remember and > don't have time to check right now. > > --pekka > > On 2014–07–03, at 12:51 , Asif Sardar <engr.asif.sardar@xxxxxxxxxxxxxx> > wrote: > > > Hello, > > > > Yes. The SPI test cases are ready. I have seen in runtime that SPI has > interface already e.g. begin(), end(), setdatamode() etc.But, I didn't see > it in emulator. > > > > BR, > > Asif. > > > > > > On Thu, Jul 3, 2014 at 12:43 PM, Pekka Nikander <pekka.nikander@xxxxxx> > wrote: > > Otso, > > > > FYI: I've started writing the ENCx24J600 driver. Looks simple and > straightforward, just work. I'll make it separate from the ENC28J60 > driver, as it will most probably be smaller (smaller flash footprint) than > the ENC28J60 driver, if done right. > > > > My current estimate is that I'll have first version ready by Monday or > Tuesday. It may or may not be complete, but in any case should be good > enough for testing on Wednesday. As usual, I will most probably run out of > time before we'll get it fully tested, though.... > > > > Asif, > > > > What's the situation with SPI library test cases? Do we have any yet? > > > > --Pekka > > > > > > > > > > -- > > With Best Regards, > > Asif Sardar. > > +358 43 8265795 > > -- *With Best Regards,Asif Sardar.+358 43 8265795*
#include <ellduino_Serial.h> void serialBegin(uint32_t baudrate) { Serial.begin(baudrate); } void serialWrite(uint8_t byte) { Serial.write(byte); }
/* * Copyright (c) 2014 ELL-i co-operative. * * ELL-i software is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * ELL-i software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ELL-i software. If not, see * <http://www.gnu.org/licenses/>. */ /* * Authors: Pekka Nikander <pekka.nikander@xxxxxxxxx> 2014 */ #ifndef _ELLDUINO_SERIAL_H_ #define _ELLDUINO_SERIAL_H_ #include "Arduino_Serial.h" static const class Serial Serial DEFINE_SERIAL(2, A, 14, 1, A, 15, 1); static const class Serial Serial1 DEFINE_SERIAL(1, A, 9, 1, A, 10, 1); #ifdef EMULATOR extern "C" { void serialBegin(uint32_t baudrate); void serialWrite(uint8_t byte); } #endif #endif //_ELLDUINO_SERIAL_H_