drv_flash.h
Go to the documentation of this file.
1 /*
2  drv_flash.c : Flash memory data structure for STM32F103
3 
4  Adapted from https://github.com/cleanflight/cleanflight/blob/master/src/main/drivers/flash.h
5 
6  This file is part of BreezySTM32.
7 
8  BreezySTM32 is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  BreezySTM32 is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with BreezySTM32. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #pragma once
23 
24 #include <stdint.h>
25 
26 typedef struct flashGeometry_s {
27  uint16_t sectors; // Count of the number of erasable blocks on the device
28 
29  uint16_t pagesPerSector;
30  const uint16_t pageSize; // In bytes
31 
32  uint32_t sectorSize; // This is just pagesPerSector * pageSize
33 
34  uint32_t totalSize; // This is just sectorSize * sectors
uint32_t totalSize
Definition: drv_flash.h:34
const uint16_t pageSize
Definition: drv_flash.h:30
uint32_t sectorSize
Definition: drv_flash.h:32
uint16_t sectors
Definition: drv_flash.h:27
struct flashGeometry_s flashGeometry_t
uint16_t pagesPerSector
Definition: drv_flash.h:29


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:46