Functions | Variables
usbd_dfu_mal.c File Reference

Generic media access Layer. More...

#include "usbd_dfu_mal.h"
#include "usbd_flash_if.h"
Include dependency graph for usbd_dfu_mal.c:

Go to the source code of this file.

Functions

static uint8_t MAL_CheckAdd (uint32_t Add)
 MAL_CheckAdd Determine which memory should be managed. More...
 
uint16_t MAL_DeInit (void)
 MAL_DeInit DeInitializes the Media on the STM32. More...
 
uint16_t MAL_Erase (uint32_t Add)
 MAL_Erase Erase a sector of memory. More...
 
uint16_t MAL_GetStatus (uint32_t Add, uint8_t Cmd, uint8_t *buffer)
 MAL_GetStatus Get the status of a given memory. More...
 
uint16_t MAL_Init (void)
 MAL_Init Initializes the Media on the STM32. More...
 
uint8_t * MAL_Read (uint32_t Add, uint32_t Len)
 MAL_Read Read sectors of memory. More...
 
uint16_t MAL_Write (uint32_t Add, uint32_t Len)
 MAL_Write Write sectors of memory. More...
 

Variables

__ALIGN_BEGIN const uint8_t *usbd_dfu_StringDesc[MAX_USED_MEDIA] __ALIGN_END
 
DFU_MAL_Prop_TypeDeftMALTab [MAX_USED_MEDIA]
 

Detailed Description

Generic media access Layer.

Author
MCD Application Team
Version
V1.1.0
Date
19-March-2012
Attention

© COPYRIGHT 2012 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file usbd_dfu_mal.c.

Function Documentation

static uint8_t MAL_CheckAdd ( uint32_t  Add)
static

MAL_CheckAdd Determine which memory should be managed.

Parameters
AddSector address/code (allow to determine which memory will be addressed)
Return values
Indexof the addressed memory.

Definition at line 270 of file usbd_dfu_mal.c.

uint16_t MAL_DeInit ( void  )

MAL_DeInit DeInitializes the Media on the STM32.

Parameters
None
Return values
Resultof the opeartion (MAL_OK in all cases)

Definition at line 118 of file usbd_dfu_mal.c.

uint16_t MAL_Erase ( uint32_t  Add)

MAL_Erase Erase a sector of memory.

Parameters
AddSector address/code
Return values
Resultof the opeartion: MAL_OK if all operations are OK else MAL_FAIL

Definition at line 141 of file usbd_dfu_mal.c.

uint16_t MAL_GetStatus ( uint32_t  Add,
uint8_t  Cmd,
uint8_t *  buffer 
)

MAL_GetStatus Get the status of a given memory.

Parameters
AddSector address/code (allow to determine which memory will be addressed)
Cmd0 for erase and 1 for write
bufferpointer to the buffer where the status data will be stored.
Return values
Bufferpointer

Definition at line 241 of file usbd_dfu_mal.c.

uint16_t MAL_Init ( void  )

MAL_Init Initializes the Media on the STM32.

Parameters
None
Return values
Resultof the opeartion (MAL_OK in all cases)

Definition at line 95 of file usbd_dfu_mal.c.

uint8_t* MAL_Read ( uint32_t  Add,
uint32_t  Len 
)

MAL_Read Read sectors of memory.

Parameters
AddSector address/code
LenNumber of data to be written (in bytes)
Return values
Bufferpointer

Definition at line 211 of file usbd_dfu_mal.c.

uint16_t MAL_Write ( uint32_t  Add,
uint32_t  Len 
)

MAL_Write Write sectors of memory.

Parameters
AddSector address/code
LenNumber of data to be written (in bytes)
Return values
Resultof the opeartion: MAL_OK if all operations are OK else MAL_FAIL

Definition at line 176 of file usbd_dfu_mal.c.

Variable Documentation

__ALIGN_BEGIN uint8_t MAL_Buffer [XFERSIZE] __ALIGN_END
Initial value:
= {
FLASH_IF_STRING
}

Definition at line 67 of file usbd_dfu_mal.c.

DFU_MAL_Prop_TypeDef* tMALTab[MAX_USED_MEDIA]
Initial value:
= {
}
DFU_MAL_Prop_TypeDef DFU_Flash_cb
Definition: usbd_flash_if.c:46

Definition at line 51 of file usbd_dfu_mal.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:28