25 lines
879 B
C
25 lines
879 B
C
//
|
|
// Created by ilya on 09.02.23.
|
|
//
|
|
|
|
#ifndef UVEOS_ON_NATION_FLASH_MX25L12833FM2I_CYCLE_H
|
|
#define UVEOS_ON_NATION_FLASH_MX25L12833FM2I_CYCLE_H
|
|
#include "inttypes.h"
|
|
|
|
|
|
#include "SpiPort.h"
|
|
typedef struct {
|
|
void *env;
|
|
uint32_t begin;
|
|
uint32_t end;
|
|
uint32_t currentRead;
|
|
uint32_t currentWrite;
|
|
tSpiPortIO *spi;
|
|
} Flash_workspace;
|
|
void Init_flash(Flash_workspace *env,uint32_t begin,uint32_t end,tSpiPortIO *spi);
|
|
extern uint8_t flashMX25_readbyte (Flash_workspace *workspace,uint32_t timeout);
|
|
extern uint8_t flashMX25_writebyte (Flash_workspace *workspace,uint8_t buf,uint32_t timeout);
|
|
extern uint8_t flashMX25_receive (Flash_workspace *workspace,uint8_t *buf, int count,uint32_t timeout);
|
|
extern uint8_t flashMX25_transmit (Flash_workspace *workspace,uint8_t *bufWrite, int count,uint32_t timeout);
|
|
#endif //UVEOS_ON_NATION_FLASH_MX25L12833FM2I_CYCLE_H
|