Header for usbd_dfu_mal.c file. More...
Go to the source code of this file.
Classes | |
struct | _DFU_MAL_PROP |
Macros | |
#define | _1st_BYTE(x) (uint8_t)((x)&0xFF) /* 1st addressing cycle */ |
#define | _2nd_BYTE(x) (uint8_t)(((x)&0xFF00)>>8) /* 2nd addressing cycle */ |
#define | _3rd_BYTE(x) (uint8_t)(((x)&0xFF0000)>>16) /* 3rd addressing cycle */ |
#define | _4th_BYTE(x) (uint8_t)(((x)&0xFF000000)>>24) /* 4th addressing cycle */ |
#define | MAL_FAIL 1 |
#define | MAL_OK 0 |
#define | SET_POLLING_TIMING(x) |
Typedefs | |
typedef struct _DFU_MAL_PROP | DFU_MAL_Prop_TypeDef |
Functions | |
uint16_t | MAL_DeInit (void) |
MAL_DeInit DeInitializes the Media on the STM32. More... | |
uint16_t | MAL_Erase (uint32_t SectorAddress) |
MAL_Erase Erase a sector of memory. More... | |
uint16_t | MAL_GetStatus (uint32_t SectorAddress, 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 SectorAddress, uint32_t DataLength) |
MAL_Read Read sectors of memory. More... | |
uint16_t | MAL_Write (uint32_t SectorAddress, uint32_t DataLength) |
MAL_Write Write sectors of memory. More... | |
Variables | |
uint8_t | MAL_Buffer [XFERSIZE] |
Header for usbd_dfu_mal.c file.
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.h.
#define _1st_BYTE | ( | x | ) | (uint8_t)((x)&0xFF) /* 1st addressing cycle */ |
Definition at line 59 of file usbd_dfu_mal.h.
#define _2nd_BYTE | ( | x | ) | (uint8_t)(((x)&0xFF00)>>8) /* 2nd addressing cycle */ |
Definition at line 60 of file usbd_dfu_mal.h.
#define _3rd_BYTE | ( | x | ) | (uint8_t)(((x)&0xFF0000)>>16) /* 3rd addressing cycle */ |
Definition at line 61 of file usbd_dfu_mal.h.
#define _4th_BYTE | ( | x | ) | (uint8_t)(((x)&0xFF000000)>>24) /* 4th addressing cycle */ |
Definition at line 62 of file usbd_dfu_mal.h.
#define MAL_FAIL 1 |
Definition at line 56 of file usbd_dfu_mal.h.
#define MAL_OK 0 |
Definition at line 55 of file usbd_dfu_mal.h.
#define SET_POLLING_TIMING | ( | x | ) |
Definition at line 65 of file usbd_dfu_mal.h.
typedef struct _DFU_MAL_PROP DFU_MAL_Prop_TypeDef |
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 |
Definition at line 83 of file usbd_dfu_mal.c.