md_t_element/src/md_31855_ktype.cpp
uint32_t md_31855_ktype::spiread32(void)
      {
        uint32_t  val;
        uint8_t   buf[4];
        uint32_t* pbuf = (uint32_t*) &buf[0];

        _spi.read(buf, 4);        // MSB first
        val  = buf[0]; val <<= 8;
        val |= buf[1]; val <<= 8;
        val |= buf[2]; val <<= 8;
        val |= buf[3];
             //SOUT(" spi buf[0-3] "); SOUTHEX(*pbuf);
             //SOUT(" result "); SOUTHEXLN(val);
        return val;
      }
/*- SPI read32 -----------------------------------
     * Read 4 bytes (32 bits) from breakout over SPI.
     * The raw 32 bit value read.
     *------------------------------------------------*/
SPI read32
Read 4 bytes (32 bits) from breakout over SPI.
The raw 32 bit value read.
SPI read32 Read 4 bytes ( 32 bits ) from breakout over SPI . The raw 32 bit value read .
uint32_t md_31855_ktype::spiread32(void)
      {
        uint32_t  val;
        uint8_t   buf[4];
        uint32_t* pbuf = (uint32_t*) &buf[0];
        _spi.read(buf, 4);        
        val  = buf[0]; val <<= 8;
        val |= buf[1]; val <<= 8;
        val |= buf[2]; val <<= 8;
        val |= buf[3];
        return val;
      }
uint32_t md_31855_ktype :: spiread32 ( void ) { uint32_t val ; uint8_t buf [ 4 ] ; uint32_t * pbuf = ( uint32_t * ) & buf [ 0 ] ; _spi . read ( buf , 4 ) ; val = buf [ 0 ] ; val <<= 8 ; val |= buf [ 1 ] ; val <<= 8 ; val |= buf [ 2 ] ; val <<= 8 ; val |= buf [ 3 ] ; return val ; }
SPI read32
 Read 4 bytes (32 bits) from breakout over SPI.
SPI read32 Read 4 bytes ( 32 bits ) from breakout over SPI .
// MSB first //SOUT(" spi buf[0-3] "); SOUTHEX(*pbuf); //SOUT(" result "); SOUTHEXLN(val);