pAttr.subMode = SpiSubMode_0;
pAttr.speed = SpiSpeed_10MHz;
pAttr.bitOrder = SpiBitOrder_MSBFirst;
SPIInit(SpiNum_HSPI, &pAttr);
}
void Send_cmd(uint8 command)
{
SpiData pDat;
pDat.cmd = command; ///< Command value
pDat.cmdLen = 1; ///< Command byte length
pDat.addr = NULL; ///< Point to address value
pDat.addrLen = 0; ///< Address byte length
pDat.data = NULL; ///< Point to data buffer
pDat.dataLen = 0; ///< Data byte length.
SPIMasterSendData(SpiNum_HSPI, &pDat);
}
/******************************************************************************
-
FunctionName : user_init
-
Description : entry of user application, init user function here
-
Parameters : none
-
Returns : none
*************************************