source: S-port/trunk/Core/Inc/AT45DB.h

Last change on this file was 1, checked in by AlexLir, 3 years ago
File size: 734 bytes
RevLine 
[1]1#ifndef __AT45DB_H
2#define __AT45DB_H
3
4#include "stm32f4xx_hal.h"
5#include "main.h"
6
7#define FLASH_CS_SET HAL_GPIO_WritePin(SPI3_CS_GPIO_Port, SPI3_CS_Pin, GPIO_PIN_RESET)
8#define FLASH_CS_RESET HAL_GPIO_WritePin(SPI3_CS_GPIO_Port, SPI3_CS_Pin, GPIO_PIN_SET);
9
10#define FLASH_SECTOR_COUNT 8192
11#define FLASH_BLOCK_SIZE 512
12#define FLASH_SECTOR_SIZE 512
13
14uint8_t ReadStatusFlash (void);
15void Flash_SetPage512(void);
16void Flash_StatusRDY (void);
17
18void Flash_ByteWrite(uint32_t bADDR, uint16_t num, uint8_t *TXdata);
19void Flash_Read(uint32_t bADDR, uint16_t num, uint8_t *RXdata);
20void Flash_PageErase(uint16_t page);
21void Flash_FullErase(void);
22void Flash_Read_ID(uint8_t *ID);
23
24#endif /* __AT45DB_H */
Note: See TracBrowser for help on using the repository browser.