Class QSPI

    • Constructor Detail

      • QSPI

        public QSPI()
    • Method Detail

      • init

        public static void init()
      • appendTXRam

        public static void appendTXRam​(int[] data)
        set receive Ram to data
        Parameters:
        data - data as 16bit integers
      • appendTXRam

        public static void appendTXRam​(int datum)
        append a value to TX Ram
        Parameters:
        datum - datam to write to TX Ram
      • readRxRam

        public static int[] readRxRam​(int numHalfWords)
        read receive ram
        Parameters:
        numHalfWords - number of 16bit integers to read
        Returns:
        data as 16bit integer array
      • readRxRam

        public static void readRxRam​(int[] buffer,
                                     int offset)
        read receive ram starting at offset (in half words)
        Parameters:
        buffer - buffer to read into, will read buffer.length halfWords
        offset - read offset (in half words)
      • sendBlocking

        public static void sendBlocking()
        send data in transfer ram and receive into receive ram blocks until transfer is done SPI is full duplex meaning data is transmitted and received simultaneously.
      • send

        public static boolean send()
        initialise command ram and start spi transaction
        Returns:
        true if transaction spi done, false if busy