ardupilot/libraries/SITL/SIM_JEDEC_MX25L3206E.h
Shiv Tyagi fa6adc0beb SITL: add JEDEC dataflash simulator
We currently use AP_Logger_SITL for this purpose but we can instead add a dataflash simulator which can work with existing AP_Logger_Dataflash backend instead of using AP_Logger_SITL.

Co-Authored-By: Divyateja Pasupuleti <divyateja2004@gmail.com>
2021-12-25 09:14:31 +11:00

27 lines
634 B
C++

#pragma once
#include "SIM_JEDEC.h"
namespace SITL {
class JEDEC_MX25L3206E : public JEDEC
{
protected:
void fill_rdid(uint8_t *buf, uint8_t len) override;
void fill_rdsr(uint8_t *buf, uint8_t len) override;
const char *filename() const override { return "blackbox.bin"; }
uint8_t get_num_blocks() const override { return 64; }
uint16_t get_page_per_block() const override { return 256; }
uint8_t get_page_per_sector() const override { return 16; }
uint16_t get_page_size() const override { return 256; }
private:
static const uint8_t type = 0x20;
static const uint8_t density = 0x16;
};
}