Skip to content

Commit 0539bf6

Browse files
committed
fix spi compile error
1 parent 96fedd7 commit 0539bf6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

demo/spi/src/demo_spi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ uint8_t SPI_ReadOneByte(SPI_ID_t SPIx)
2424
SPI_Write(SPIx, &temp, 1);
2525
while(!SPI_IsTxDone(SPIx));
2626
SPI_Read(SPIx, &r_byte, 1);
27+
return r_byte;
2728
}
2829

2930
uint32_t SPI_ReadWriteData(SPI_ID_t SPIx, uint8_t *s_data, uint8_t *r_data, uint32_t length)
@@ -178,11 +179,11 @@ void Spi_MainTask()
178179
}
179180
#endif
180181

181-
void spi_Main(HANDLE* pHandleMainTask)
182+
void spi_Main()
182183
{
183184
mainTaskHandle = OS_CreateTask(Spi_MainTask ,
184185
NULL, NULL, MAIN_TASK_STACK_SIZE, MAIN_TASK_PRIORITY, 0, 0, MAIN_TASK_NAME);
185-
*pHandleMainTask = mainTaskHandle;
186+
OS_SetUserMainHandle(&mainTaskHandle);
186187
}
187188

188189

0 commit comments

Comments
 (0)