add: 'mem info' - rudamentary support for new command.

This commit is contained in:
iceman1001 2018-05-06 09:26:06 +02:00
commit 6b7819276d
3 changed files with 51 additions and 5 deletions

View file

@ -4,7 +4,7 @@
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
// at your option, any later version. See the LICENSE.txt file for the text of
// the license.
//
//-----------------------------------------------------------------------------
// Interlib Definitions
//-----------------------------------------------------------------------------
@ -46,6 +46,35 @@ extern int MF_DBGLEVEL;
#endif
#define RAMFUNC __attribute((long_call, section(".ramfunc")))
// RDV40 Section
#ifndef FLASH_MEM_BLOCK_SIZE
# define FLASH_MEM_BLOCK_SIZE 256
#endif
#ifndef FLASH_MEM_MAX_SIZE
# define FLASH_MEM_MAX_SIZE 0x3FFFF
#endif
#ifndef FLASH_MEM_ID_LEN
# define FLASH_MEM_ID_LEN 8
#endif
#ifndef FLASH_MEM_SIGNATURE_LEN
# define FLASH_MEM_SIGNATURE_LEN 128
#endif
#ifndef FLASH_MEM_SIGNATURE_OFFSET
# define FLASH_MEM_SIGNATURE_OFFSET (FLASH_MEM_MAX_SIZE - FLASH_MEM_SIGNATURE_LEN)
#endif
// RDV40, validation structure to help identifying that client/firmware is talking with RDV40
typedef struct {
uint8_t magic[4];
uint8_t flashid[FLASH_MEM_ID_LEN];
uint8_t signature[FLASH_MEM_SIGNATURE_LEN];
} __attribute__((__packed__)) rdv40_validation_t;
#ifdef __cplusplus
}