本帖最后由 yufeiwangmqb 于 2017-2-14 22:30 编辑
stm32f746
之前发现1.3版本freertos代码有些小错误,换成1.6编译后也发现HAL_SD_TransferStateTypedef出错,其他地方还有好多错误。
1.6版本库改动有点大,没有HAL_SD_TransferStateTypedef数据结构,新增HAL_SD_StateTypeDef数据结构
1.3版本
生成的bsp_driver_sd.c文件
HAL_SD_TransferStateTypedef BSP_SD_GetStatus(void)
{
return(HAL_SD_GetStatus(&hsd1));
}
库文件 stm32f7xx_hal_sd.h
HAL_SD_TransferStateTypedef HAL_SD_GetStatus(SD_HandleTypeDef *hsd);
typedef enum
{
SD_TRANSFER_OK = 0, /*!< Transfer success */
SD_TRANSFER_BUSY = 1, /*!< Transfer is occurring */
SD_TRANSFER_ERROR = 2 /*!< Transfer failed */
}HAL_SD_TransferStateTypedef;
1.6版本
typedef enum
{
HAL_SD_STATE_RESET = ((uint32_t)0x00000000U), /*!< SD not yet initialized or disabled */
HAL_SD_STATE_READY = ((uint32_t)0x00000001U), /*!< SD initialized and ready for use */
HAL_SD_STATE_TIMEOUT = ((uint32_t)0x00000002U), /*!< SD Timeout state */
HAL_SD_STATE_BUSY = ((uint32_t)0x00000003U), /*!< SD process ongoing */
HAL_SD_STATE_PROGRAMMING = ((uint32_t)0x00000004U), /*!< SD Programming State */
HAL_SD_STATE_RECEIVING = ((uint32_t)0x00000005U), /*!< SD Receinving State */
HAL_SD_STATE_TRANSFER = ((uint32_t)0x00000006U), /*!< SD Transfert State */
HAL_SD_STATE_ERROR = ((uint32_t)0x0000000FU) /*!< SD is in error state */
}HAL_SD_StateTypeDef;
HAL_SD_StateTypeDef HAL_SD_GetState(SD_HandleTypeDef *hsd);
本帖最后由 yufeiwangmqb 于 2017-2-14 22:30 编辑
stm32f746
之前发现1.3版本freertos代码有些小错误,换成1.6编译后也发现HAL_SD_TransferStateTypedef出错,其他地方还有好多错误。
1.6版本库改动有点大,没有HAL_SD_TransferStateTypedef数据结构,新增HAL_SD_StateTypeDef数据结构
1.3版本
生成的bsp_driver_sd.c文件
HAL_SD_TransferStateTypedef BSP_SD_GetStatus(void)
{
return(HAL_SD_GetStatus(&hsd1));
}
库文件 stm32f7xx_hal_sd.h
HAL_SD_TransferStateTypedef HAL_SD_GetStatus(SD_HandleTypeDef *hsd);
typedef enum
{
SD_TRANSFER_OK = 0, /*!< Transfer success */
SD_TRANSFER_BUSY = 1, /*!< Transfer is occurring */
SD_TRANSFER_ERROR = 2 /*!< Transfer failed */
}HAL_SD_TransferStateTypedef;
1.6版本
typedef enum
{
HAL_SD_STATE_RESET = ((uint32_t)0x00000000U), /*!< SD not yet initialized or disabled */
HAL_SD_STATE_READY = ((uint32_t)0x00000001U), /*!< SD initialized and ready for use */
HAL_SD_STATE_TIMEOUT = ((uint32_t)0x00000002U), /*!< SD Timeout state */
HAL_SD_STATE_BUSY = ((uint32_t)0x00000003U), /*!< SD process ongoing */
HAL_SD_STATE_PROGRAMMING = ((uint32_t)0x00000004U), /*!< SD Programming State */
HAL_SD_STATE_RECEIVING = ((uint32_t)0x00000005U), /*!< SD Receinving State */
HAL_SD_STATE_TRANSFER = ((uint32_t)0x00000006U), /*!< SD Transfert State */
HAL_SD_STATE_ERROR = ((uint32_t)0x0000000FU) /*!< SD is in error state */
}HAL_SD_StateTypeDef;
HAL_SD_StateTypeDef HAL_SD_GetState(SD_HandleTypeDef *hsd);
举报