예제 #1
0
/********************************************************************
*     Function Name:    LDByteReadSPI                               *
*     Parameters:       EE memory control, address, pointer and     *
*                       length bytes.                               *
*     Description:      Reads data Byte from SPI EE memory device.  *
*                       This routine can be used for any SPI        *
*                       EE memory device with 1 byte of address     *
*                                                                   *
********************************************************************/
unsigned char LDByteReadSPI(unsigned char OpCode, unsigned char *rdptr, unsigned char length )
{
  CS_nRF = 0;                             // Select Device
  WriteSPI1( OpCode );                  // Send Read OpCode or register
  getsSPI( rdptr, length );           // read in multiple bytes
  CS_nRF = 1;                             // Deselect Device
  return ( 0 );
}
예제 #2
0
void getYebImmediate(Byte* data, Byte length) {
    getsSPI(data, length);
}