Generic media access Layer. More...
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_TypeDef * | tMALTab [MAX_USED_MEDIA] |
Generic media access Layer.
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.
|
static |
MAL_CheckAdd Determine which memory should be managed.
Add | Sector address/code (allow to determine which memory will be addressed) |
Index | of 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.
None |
Result | of 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.
Add | Sector address/code |
Result | of 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.
Add | Sector address/code (allow to determine which memory will be addressed) |
Cmd | 0 for erase and 1 for write |
buffer | pointer to the buffer where the status data will be stored. |
Buffer | pointer |
Definition at line 241 of file usbd_dfu_mal.c.
uint16_t MAL_Init | ( | void | ) |
MAL_Init Initializes the Media on the STM32.
None |
Result | of 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.
Add | Sector address/code |
Len | Number of data to be written (in bytes) |
Buffer | pointer |
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.
Add | Sector address/code |
Len | Number of data to be written (in bytes) |
Result | of the opeartion: MAL_OK if all operations are OK else MAL_FAIL |
Definition at line 176 of file usbd_dfu_mal.c.
__ALIGN_BEGIN uint8_t MAL_Buffer [XFERSIZE] __ALIGN_END |
Definition at line 67 of file usbd_dfu_mal.c.
DFU_MAL_Prop_TypeDef* tMALTab[MAX_USED_MEDIA] |
Definition at line 51 of file usbd_dfu_mal.c.