drv_m25p16.h
Go to the documentation of this file.
1 /*
2  drv_m25p16.h : function prototypes for Micron Technology MP25P16 flash memory
3 
4  Adapted from https://github.com/cleanflight/cleanflight/blob/master/src/main/drivers/flash_m25p16.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 #include "drv_flash.h"
26 
27 #define M25P16_PAGESIZE 256
28 
29 bool m25p16_init();
30 
31 void m25p16_eraseSector(uint32_t address);
33 
34 void m25p16_pageProgram(uint32_t address, const uint8_t *data, int length);
35 
36 void m25p16_pageProgramBegin(uint32_t address);
37 void m25p16_pageProgramContinue(const uint8_t *data, int length);
39 
40 int m25p16_readBytes(uint32_t address, uint8_t *buffer, int length);
41 
42 bool m25p16_isReady();
43 bool m25p16_waitForReady(uint32_t timeoutMillis);
44 
void m25p16_pageProgramBegin(uint32_t address)
Definition: drv_m25p16.c:252
uint8_t * data
Definition: drv_i2c.h:47
void m25p16_pageProgram(uint32_t address, const uint8_t *data, int length)
Definition: drv_m25p16.c:290
bool m25p16_waitForReady(uint32_t timeoutMillis)
Definition: drv_m25p16.c:136
bool m25p16_init()
Definition: drv_m25p16.c:217
const flashGeometry_t * m25p16_getGeometry()
Definition: drv_m25p16.c:330
static uint8_t buffer[BMP280_DATA_FRAME_SIZE]
Definition: drv_bmp280.c:61
void m25p16_pageProgramContinue(const uint8_t *data, int length)
Definition: drv_m25p16.c:265
int m25p16_readBytes(uint32_t address, uint8_t *buffer, int length)
Definition: drv_m25p16.c:307
void m25p16_eraseCompletely()
Definition: drv_m25p16.c:243
bool m25p16_isReady()
Definition: drv_m25p16.c:128
uint8_t length
Definition: drv_i2c.h:48
void m25p16_eraseSector(uint32_t address)
Definition: drv_m25p16.c:228
void m25p16_pageProgramFinish()
Definition: drv_m25p16.c:270


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