Functions | Variables
usbd_mem_if_template.c File Reference

Specific media access Layer for a template memory. This file is provided as template example showing how to implement a new memory interface based on pre-defined API. More...

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

Go to the source code of this file.

Functions

uint16_t MEM_If_CheckAdd (uint32_t Add)
 MEM_If_CheckAdd Check if the address is an allowed address for this memory. More...
 
uint16_t MEM_If_DeInit (void)
 MEM_If_DeInit Memory deinitialization routine. More...
 
uint16_t MEM_If_Erase (uint32_t Add)
 MEM_If_Erase Erase sector. More...
 
uint16_t MEM_If_Init (void)
 MEM_If_Init Memory initialization routine. More...
 
uint8_t * MEM_If_Read (uint32_t Add, uint32_t Len)
 MEM_If_Read Memory read routine. More...
 
uint16_t MEM_If_Write (uint32_t Add, uint32_t Len)
 MEM_If_Write Memory write routine. More...
 

Variables

DFU_MAL_Prop_TypeDef DFU_Mem_cb
 

Detailed Description

Specific media access Layer for a template memory. This file is provided as template example showing how to implement a new memory interface based on pre-defined API.

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_mem_if_template.c.

Function Documentation

uint16_t MEM_If_CheckAdd ( uint32_t  Add)

MEM_If_CheckAdd Check if the address is an allowed address for this memory.

Parameters
AddAddress to be checked.
LenNumber of data to be read (in bytes).
Return values
MAL_OKif the address is allowed, MAL_FAIL else.

Definition at line 128 of file usbd_mem_if_template.c.

uint16_t MEM_If_DeInit ( void  )

MEM_If_DeInit Memory deinitialization routine.

Parameters
None
Return values
MAL_OKif operation is successeful, MAL_FAIL else.

Definition at line 80 of file usbd_mem_if_template.c.

uint16_t MEM_If_Erase ( uint32_t  Add)

MEM_If_Erase Erase sector.

Parameters
AddAddress of sector to be erased.
Return values
MAL_OKif operation is successeful, MAL_FAIL else.

Definition at line 91 of file usbd_mem_if_template.c.

uint16_t MEM_If_Init ( void  )

MEM_If_Init Memory initialization routine.

Parameters
None
Return values
MAL_OKif operation is successeful, MAL_FAIL else.

Definition at line 69 of file usbd_mem_if_template.c.

uint8_t * MEM_If_Read ( uint32_t  Add,
uint32_t  Len 
)

MEM_If_Read Memory read routine.

Parameters
AddAddress to be read from.
LenNumber of data to be read (in bytes).
Return values
Pointerto the phyisical address where data should be read.

Definition at line 115 of file usbd_mem_if_template.c.

uint16_t MEM_If_Write ( uint32_t  Add,
uint32_t  Len 
)

MEM_If_Write Memory write routine.

Parameters
AddAddress to be written to.
LenNumber of data to be written (in bytes).
Return values
MAL_OKif operation is successeful, MAL_FAIL else.

Definition at line 103 of file usbd_mem_if_template.c.

Variable Documentation

Initial value:
=
{
10,
10
}
uint16_t MEM_If_DeInit(void)
MEM_If_DeInit Memory deinitialization routine.
uint16_t MEM_If_CheckAdd(uint32_t Add)
MEM_If_CheckAdd Check if the address is an allowed address for this memory.
#define MEM_IF_STRING
uint8_t * MEM_If_Read(uint32_t Add, uint32_t Len)
MEM_If_Read Memory read routine.
uint16_t MEM_If_Init(void)
MEM_If_Init Memory initialization routine.
uint16_t MEM_If_Erase(uint32_t Add)
MEM_If_Erase Erase sector.
uint16_t MEM_If_Write(uint32_t Add, uint32_t Len)
MEM_If_Write Memory write routine.

Definition at line 48 of file usbd_mem_if_template.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:21