/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_SPI1_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
printf("instruction is like this CMD0 CMD1 CMD2. CMD0 is direction, CMD1 is what you want to input, CMD2 is length ");
printf("CMD0 is direction:0-just get data, 1-send a command and get data,2-send lots of data ");
printf("when CMD0 is 2, CMD2 means how long what you will send ");
printf("when CMD0 is 3, you can config spi. CMD1 means CPOL(0-LOW,1-HIGH,other no change),CMD2 means CPHA(0:1st edge, 1:2ns edge,other- no change) ");
printf("when CMD0 is 4, you can config spi. CMD1 means First bit select(0-MSB,1-LSB,other-no change).CMD2 Baud rate(0-1Mbps,1-500Kbps,2-250Kbps,3-2Mbps,4-4Mbps,other-nochange) ");
printf("When CMD0 is 5, give some tips again.");
printf("You can't give a too long parameter for CMD2. It should be not bigger than %d",(uint8_t)SPI_PIPE_LEN);