Input Output and memory control functions.
More...
|
| HAL_StatusTypeDef | HAL_SRAM_Read_8b (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize) |
| | Read 8-bit buffer from SRAM memory. More...
|
| |
| HAL_StatusTypeDef | HAL_SRAM_Write_8b (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize) |
| | Write 8-bit buffer to SRAM memory. More...
|
| |
| HAL_StatusTypeDef | HAL_SRAM_Read_16b (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize) |
| | Read 16-bit buffer from SRAM memory. More...
|
| |
| HAL_StatusTypeDef | HAL_SRAM_Write_16b (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize) |
| | Write 16-bit buffer to SRAM memory. More...
|
| |
| HAL_StatusTypeDef | HAL_SRAM_Read_32b (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize) |
| | Read 32-bit buffer from SRAM memory. More...
|
| |
| HAL_StatusTypeDef | HAL_SRAM_Write_32b (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize) |
| | Write 32-bit buffer to SRAM memory. More...
|
| |
| HAL_StatusTypeDef | HAL_SRAM_Read_DMA (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize) |
| | Read a Word data buffer from the SRAM memory using DMA transfer. More...
|
| |
| HAL_StatusTypeDef | HAL_SRAM_Write_DMA (SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize) |
| | Write a Word data buffer to SRAM memory using DMA transfer. More...
|
| |
| void | HAL_SRAM_DMA_XferCpltCallback (DMA_HandleTypeDef *hdma) |
| | DMA transfer complete callback. More...
|
| |
| void | HAL_SRAM_DMA_XferErrorCallback (DMA_HandleTypeDef *hdma) |
| | DMA transfer complete error callback. More...
|
| |
Input Output and memory control functions.
==============================================================================
##### SRAM Input and Output functions #####
==============================================================================
[..]
This section provides functions allowing to use and control the SRAM memory
◆ HAL_SRAM_DMA_XferCpltCallback()
DMA transfer complete callback.
- Parameters
-
| hdma | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
- Return values
-
Definition at line 216 of file stm32l4xx_hal_sram.c.
◆ HAL_SRAM_DMA_XferErrorCallback()
DMA transfer complete error callback.
- Parameters
-
| hdma | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
- Return values
-
Definition at line 232 of file stm32l4xx_hal_sram.c.
◆ HAL_SRAM_Read_16b()
| HAL_StatusTypeDef HAL_SRAM_Read_16b |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint16_t * |
pDstBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Read 16-bit buffer from SRAM memory.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to read start address |
| pDstBuffer | Pointer to destination buffer |
| BufferSize | Size of the buffer to read from memory |
- Return values
-
Definition at line 347 of file stm32l4xx_hal_sram.c.
349 __IO uint16_t * psramaddress = (uint16_t *)pAddress;
355 hsram->
State = HAL_SRAM_STATE_BUSY;
358 for(; BufferSize != 0; BufferSize--)
360 *pDstBuffer = *(__IO uint16_t *)psramaddress;
366 hsram->
State = HAL_SRAM_STATE_READY;
__IO HAL_SRAM_StateTypeDef State
◆ HAL_SRAM_Read_32b()
| HAL_StatusTypeDef HAL_SRAM_Read_32b |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint32_t * |
pDstBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Read 32-bit buffer from SRAM memory.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to read start address |
| pDstBuffer | Pointer to destination buffer |
| BufferSize | Size of the buffer to read from memory |
- Return values
-
Definition at line 425 of file stm32l4xx_hal_sram.c.
431 hsram->
State = HAL_SRAM_STATE_BUSY;
434 for(; BufferSize != 0; BufferSize--)
436 *pDstBuffer = *(__IO uint32_t *)pAddress;
442 hsram->
State = HAL_SRAM_STATE_READY;
__IO HAL_SRAM_StateTypeDef State
◆ HAL_SRAM_Read_8b()
| HAL_StatusTypeDef HAL_SRAM_Read_8b |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint8_t * |
pDstBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Read 8-bit buffer from SRAM memory.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to read start address |
| pDstBuffer | Pointer to destination buffer |
| BufferSize | Size of the buffer to read from memory |
- Return values
-
Definition at line 269 of file stm32l4xx_hal_sram.c.
271 __IO uint8_t * psramaddress = (uint8_t *)pAddress;
277 hsram->
State = HAL_SRAM_STATE_BUSY;
280 for(; BufferSize != 0; BufferSize--)
282 *pDstBuffer = *(__IO uint8_t *)psramaddress;
288 hsram->
State = HAL_SRAM_STATE_READY;
__IO HAL_SRAM_StateTypeDef State
◆ HAL_SRAM_Read_DMA()
| HAL_StatusTypeDef HAL_SRAM_Read_DMA |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint32_t * |
pDstBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Read a Word data buffer from the SRAM memory using DMA transfer.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to read start address |
| pDstBuffer | Pointer to destination buffer |
| BufferSize | Size of the buffer to read from memory |
- Return values
-
Definition at line 499 of file stm32l4xx_hal_sram.c.
505 hsram->
State = HAL_SRAM_STATE_BUSY;
515 hsram->
State = HAL_SRAM_STATE_READY;
void(* XferCpltCallback)(struct __DMA_HandleTypeDef *hdma)
__weak void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma)
DMA transfer complete callback.
void(* XferErrorCallback)(struct __DMA_HandleTypeDef *hdma)
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
Start the DMA Transfer with interrupt enabled.
__weak void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
DMA transfer complete error callback.
__IO HAL_SRAM_StateTypeDef State
◆ HAL_SRAM_Write_16b()
| HAL_StatusTypeDef HAL_SRAM_Write_16b |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint16_t * |
pSrcBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Write 16-bit buffer to SRAM memory.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to write start address |
| pSrcBuffer | Pointer to source buffer to write |
| BufferSize | Size of the buffer to write to memory |
- Return values
-
Definition at line 383 of file stm32l4xx_hal_sram.c.
385 __IO uint16_t * psramaddress = (uint16_t *)pAddress;
388 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
397 hsram->
State = HAL_SRAM_STATE_BUSY;
400 for(; BufferSize != 0; BufferSize--)
402 *(__IO uint16_t *)psramaddress = *pSrcBuffer;
408 hsram->
State = HAL_SRAM_STATE_READY;
__IO HAL_SRAM_StateTypeDef State
◆ HAL_SRAM_Write_32b()
| HAL_StatusTypeDef HAL_SRAM_Write_32b |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint32_t * |
pSrcBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Write 32-bit buffer to SRAM memory.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to write start address |
| pSrcBuffer | Pointer to source buffer to write |
| BufferSize | Size of the buffer to write to memory |
- Return values
-
Definition at line 459 of file stm32l4xx_hal_sram.c.
462 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
471 hsram->
State = HAL_SRAM_STATE_BUSY;
474 for(; BufferSize != 0; BufferSize--)
476 *(__IO uint32_t *)pAddress = *pSrcBuffer;
482 hsram->
State = HAL_SRAM_STATE_READY;
__IO HAL_SRAM_StateTypeDef State
◆ HAL_SRAM_Write_8b()
| HAL_StatusTypeDef HAL_SRAM_Write_8b |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint8_t * |
pSrcBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Write 8-bit buffer to SRAM memory.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to write start address |
| pSrcBuffer | Pointer to source buffer to write |
| BufferSize | Size of the buffer to write to memory |
- Return values
-
Definition at line 305 of file stm32l4xx_hal_sram.c.
307 __IO uint8_t * psramaddress = (uint8_t *)pAddress;
310 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
319 hsram->
State = HAL_SRAM_STATE_BUSY;
322 for(; BufferSize != 0; BufferSize--)
324 *(__IO uint8_t *)psramaddress = *pSrcBuffer;
330 hsram->
State = HAL_SRAM_STATE_READY;
__IO HAL_SRAM_StateTypeDef State
◆ HAL_SRAM_Write_DMA()
| HAL_StatusTypeDef HAL_SRAM_Write_DMA |
( |
SRAM_HandleTypeDef * |
hsram, |
|
|
uint32_t * |
pAddress, |
|
|
uint32_t * |
pSrcBuffer, |
|
|
uint32_t |
BufferSize |
|
) |
| |
Write a Word data buffer to SRAM memory using DMA transfer.
- Parameters
-
| hsram | pointer to a SRAM_HandleTypeDef structure that contains the configuration information for SRAM module. |
| pAddress | Pointer to write start address |
| pSrcBuffer | Pointer to source buffer to write |
| BufferSize | Size of the buffer to write to memory |
- Return values
-
Definition at line 532 of file stm32l4xx_hal_sram.c.
535 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
544 hsram->
State = HAL_SRAM_STATE_BUSY;
554 hsram->
State = HAL_SRAM_STATE_READY;
void(* XferCpltCallback)(struct __DMA_HandleTypeDef *hdma)
__weak void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma)
DMA transfer complete callback.
void(* XferErrorCallback)(struct __DMA_HandleTypeDef *hdma)
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
Start the DMA Transfer with interrupt enabled.
__weak void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
DMA transfer complete error callback.
__IO HAL_SRAM_StateTypeDef State