Line | |
---|
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 |
|
---|
14 | uint8_t ReadStatusFlash (void);
|
---|
15 | void Flash_SetPage512(void);
|
---|
16 | void Flash_StatusRDY (void);
|
---|
17 |
|
---|
18 | void Flash_ByteWrite(uint32_t bADDR, uint16_t num, uint8_t *TXdata);
|
---|
19 | void Flash_Read(uint32_t bADDR, uint16_t num, uint8_t *RXdata);
|
---|
20 | void Flash_PageErase(uint16_t page);
|
---|
21 | void Flash_FullErase(void);
|
---|
22 | void Flash_Read_ID(uint8_t *ID);
|
---|
23 |
|
---|
24 | #endif /* __AT45DB_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.