Mikroe PIXI click board

I have been trying to write a driver for this click board


which is based on the max11300 chip

I am using it on a flip-n-click board.

In python I thought i was getting somewhere, but the results to register reads were always 0xFFFF

Which after experimenting I get when the PIXI click board is unplugged as well.

It seems to have three bytes per spi event, so I would expect to write one byte and receive 2.

After lots of variations in python which all got 0xFFFF I have tried to do it in a native c file.

With configuration stucture and initialisation:

struct _vhal_spi_conf PIXIconf;

        PIXIconf.clock = 20000000;
        PIXIconf.miso = D20;
        PIXIconf.mosi = D19;
        PIXIconf.sclk = D18;
        PIXIconf.nss = D17;
        PIXIconf.mode = SPI_MODE_LOW_FIRST;
        PIXIconf.bits = SPI_BITS_8;
        PIXIconf.msbfirst = 1;

        if ( vhalSpiInit(spi, &PIXIconf) != 0)
            return VHAL_HARDWARE_INITIALIZATION_ERROR;

        return ERR_OK;

It throws the VHAL_HARDWARE_INITIALIZATION_ERROR error.

Those are the values for it being in slot A of the flip and click.

If i change mode to 0, bits to 8, and clock to 7000000 I still get the same error.

I suggest that you start form the MAX7219 library as it also uses SPI, I think starting from there and editing step-by-step would be easier.
you can find the library at : install_destination/.zerynth2/dist/r2.5.2/libs/official/maxim/max7219/max7219.py