Subversion Repositories DashDisplay

Rev

Rev 56 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 56 Rev 61
Line 47... Line 47...
47
/** @defgroup SD_Exported_Types_Group1 SD State enumeration structure
47
/** @defgroup SD_Exported_Types_Group1 SD State enumeration structure
48
  * @{
48
  * @{
49
  */  
49
  */  
50
typedef enum
50
typedef enum
51
{
51
{
52
  HAL_SD_STATE_RESET                  = ((uint32_t)0x00000000U),  /*!< SD not yet initialized or disabled  */
52
  HAL_SD_STATE_RESET                  = 0x00000000U,  /*!< SD not yet initialized or disabled  */
53
  HAL_SD_STATE_READY                  = ((uint32_t)0x00000001U),  /*!< SD initialized and ready for use    */
53
  HAL_SD_STATE_READY                  = 0x00000001U,  /*!< SD initialized and ready for use    */
54
  HAL_SD_STATE_TIMEOUT                = ((uint32_t)0x00000002U),  /*!< SD Timeout state                    */
54
  HAL_SD_STATE_TIMEOUT                = 0x00000002U,  /*!< SD Timeout state                    */
55
  HAL_SD_STATE_BUSY                   = ((uint32_t)0x00000003U),  /*!< SD process ongoing                  */
55
  HAL_SD_STATE_BUSY                   = 0x00000003U,  /*!< SD process ongoing                  */
56
  HAL_SD_STATE_PROGRAMMING            = ((uint32_t)0x00000004U),  /*!< SD Programming State                */
56
  HAL_SD_STATE_PROGRAMMING            = 0x00000004U,  /*!< SD Programming State                */
57
  HAL_SD_STATE_RECEIVING              = ((uint32_t)0x00000005U),  /*!< SD Receiving State                  */
57
  HAL_SD_STATE_RECEIVING              = 0x00000005U,  /*!< SD Receiving State                  */
58
  HAL_SD_STATE_TRANSFER               = ((uint32_t)0x00000006U),  /*!< SD Transfert State                  */
58
  HAL_SD_STATE_TRANSFER               = 0x00000006U,  /*!< SD Transfer State                  */
59
  HAL_SD_STATE_ERROR                  = ((uint32_t)0x0000000FU)   /*!< SD is in error state                */
59
  HAL_SD_STATE_ERROR                  = 0x0000000FU   /*!< SD is in error state                */
60
}HAL_SD_StateTypeDef;
60
}HAL_SD_StateTypeDef;
61
/**
61
/**
62
  * @}
62
  * @}
63
  */
63
  */
64
 
64
 
Line 285... Line 285...
285
/* Exported constants --------------------------------------------------------*/
285
/* Exported constants --------------------------------------------------------*/
286
/** @defgroup SD_Exported_Constants Exported Constants
286
/** @defgroup SD_Exported_Constants Exported Constants
287
  * @{
287
  * @{
288
  */
288
  */
289
 
289
 
290
#define BLOCKSIZE   ((uint32_t)512U) /*!< Block size is 512 bytes */
290
#define BLOCKSIZE   512U /*!< Block size is 512 bytes */
291
 
291
 
292
/** @defgroup SD_Exported_Constansts_Group1 SD Error status enumeration Structure definition
292
/** @defgroup SD_Exported_Constansts_Group1 SD Error status enumeration Structure definition
293
  * @{
293
  * @{
294
  */  
294
  */  
295
#define HAL_SD_ERROR_NONE                     SDMMC_ERROR_NONE                    /*!< No error                                                      */
295
#define HAL_SD_ERROR_NONE                     SDMMC_ERROR_NONE                    /*!< No error                                                      */
Line 337... Line 337...
337
  */
337
  */
338
 
338
 
339
/** @defgroup SD_Exported_Constansts_Group2 SD context enumeration
339
/** @defgroup SD_Exported_Constansts_Group2 SD context enumeration
340
  * @{
340
  * @{
341
  */
341
  */
342
#define SD_CONTEXT_NONE                 ((uint32_t)0x00000000U)  /*!< None                             */
342
#define SD_CONTEXT_NONE                            0x00000000U   /*!< None                             */
343
#define SD_CONTEXT_READ_SINGLE_BLOCK    ((uint32_t)0x00000001U)  /*!< Read single block operation      */
343
#define SD_CONTEXT_READ_SINGLE_BLOCK               0x00000001U   /*!< Read single block operation      */
344
#define SD_CONTEXT_READ_MULTIPLE_BLOCK  ((uint32_t)0x00000002U)  /*!< Read multiple blocks operation   */
344
#define SD_CONTEXT_READ_MULTIPLE_BLOCK             0x00000002U   /*!< Read multiple blocks operation   */
345
#define SD_CONTEXT_WRITE_SINGLE_BLOCK   ((uint32_t)0x00000010U)  /*!< Write single block operation     */
345
#define SD_CONTEXT_WRITE_SINGLE_BLOCK              0x00000010U   /*!< Write single block operation     */
346
#define SD_CONTEXT_WRITE_MULTIPLE_BLOCK ((uint32_t)0x00000020U)  /*!< Write multiple blocks operation  */
346
#define SD_CONTEXT_WRITE_MULTIPLE_BLOCK            0x00000020U   /*!< Write multiple blocks operation  */
347
#define SD_CONTEXT_IT                   ((uint32_t)0x00000008U)  /*!< Process in Interrupt mode        */
347
#define SD_CONTEXT_IT                              0x00000008U   /*!< Process in Interrupt mode        */
348
#define SD_CONTEXT_DMA                  ((uint32_t)0x00000080U)  /*!< Process in DMA mode              */
348
#define SD_CONTEXT_DMA                             0x00000080U   /*!< Process in DMA mode              */
349
 
349
 
350
/**
350
/**
351
  * @}
351
  * @}
352
  */
352
  */
353
 
353
 
354
/** @defgroup SD_Exported_Constansts_Group3 SD Supported Memory Cards
354
/** @defgroup SD_Exported_Constansts_Group3 SD Supported Memory Cards
355
  * @{
355
  * @{
356
  */
356
  */
357
#define CARD_SDSC                  ((uint32_t)0x00000000U)  /*!< SD Standard Capacity <2Go                          */
357
#define CARD_SDSC                  0x00000000U  /*!< SD Standard Capacity <2Go                          */
358
#define CARD_SDHC_SDXC             ((uint32_t)0x00000001U)  /*!< SD High Capacity <32Go, SD Extended Capacity <2To  */
358
#define CARD_SDHC_SDXC             0x00000001U  /*!< SD High Capacity <32Go, SD Extended Capacity <2To  */
359
#define CARD_SECURED               ((uint32_t)0x00000003U)
359
#define CARD_SECURED               0x00000003U
360
   
360
   
361
/**
361
/**
362
  * @}
362
  * @}
363
  */
363
  */
364
 
364
 
365
/** @defgroup SD_Exported_Constansts_Group4 SD Supported Version
365
/** @defgroup SD_Exported_Constansts_Group4 SD Supported Version
366
  * @{
366
  * @{
367
  */
367
  */
368
#define CARD_V1_X                  ((uint32_t)0x00000000U)
368
#define CARD_V1_X                  0x00000000U
369
#define CARD_V2_X                  ((uint32_t)0x00000001U)
369
#define CARD_V2_X                  0x00000001U
370
/**
370
/**
371
  * @}
371
  * @}
372
  */
372
  */
373
     
373
     
374
/**
374
/**
Line 636... Line 636...
636
 
636
 
637
/** @defgroup SD_Exported_Functions_Group3 Peripheral Control functions
637
/** @defgroup SD_Exported_Functions_Group3 Peripheral Control functions
638
  * @{
638
  * @{
639
  */
639
  */
640
HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation(SD_HandleTypeDef *hsd, uint32_t WideMode);
640
HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation(SD_HandleTypeDef *hsd, uint32_t WideMode);
641
HAL_StatusTypeDef HAL_SD_ConfigSpeedBusOperation(SD_HandleTypeDef *hsd, uint32_t SpeedMode);
-
 
642
/**
641
/**
643
  * @}
642
  * @}
644
  */
643
  */
645
 
644
 
646
/** @defgroup SD_Exported_Functions_Group4 SD card related functions
645
/** @defgroup SD_Exported_Functions_Group4 SD card related functions