13 #define DO_INITIALISATION 1 30 static uint32_t m_z = 1234;
31 static uint32_t m_w = 76542;
32 m_z = 36969 * (m_z & 65535) + (m_z >> 16);
33 m_w = 18000 * (m_w & 65535) + (m_w >> 16);
34 return ((m_z << 16) + m_w) & 0xFFFF;
40 static uint8_t
pvalue(uint16_t offset)
42 return ((offset * 7) + 13) % 65536;
49 for (uint8_t type = 0; type < 4; type++) {
52 for (uint16_t i = 0; i < storage.
size(); i++) {
61 static uint32_t
count;
66 if (offset + length > storage.
size()) {
67 length = storage.
size() - offset;
73 for (uint8_t i=0; i<length; i++) {
80 (
unsigned)offset, (
unsigned)length);
86 (
unsigned)offset, (
unsigned)length);
88 if (memcmp(b, b2, length) != 0) {
90 (
unsigned)offset, (
unsigned)length);
95 if (count % 10000 == 0) {
AP_HAL::UARTDriver * console
static uint16_t get_random(void)
uint16_t size(void) const
void write_byte(uint16_t loc, uint8_t value) const
virtual void printf(const char *,...) FMT_PRINTF(2
bool read_block(void *dst, uint16_t src, size_t n) const
static uint8_t pvalue(uint16_t offset)
bool write_block(uint16_t dst, const void *src, size_t n) const
static StorageAccess all_storage[4]
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-