diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-04-14 15:32:34 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2020-04-14 15:32:34 +0100 |
commit | 9dc512cabe12fc95aa04fe7a95b9f9baaf89e04f (patch) | |
tree | 066c3fd4b0937f0f8b8b4abb9a4c1074947c09e1 /zap.h | |
parent | 2442ede472e1d7343931442f916aa0cdd55b6f71 (diff) |
add missing fileszap
Diffstat (limited to 'zap.h')
-rw-r--r-- | zap.h | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,31 @@ +#ifndef ZAP_H +#define ZAP_H + +#include <stdbool.h> +#include <stdint.h> + +typedef uint32_t u32; +typedef uint16_t u16; +typedef uint8_t u8; + +struct zap_private; + +struct zap { + unsigned int val_width; + unsigned int addr_shift; + unsigned int min_addr; + unsigned int max_addr; + bool ascii; + bool (*read)(void *private, u32 addr, u32 *val); + bool (*read_block)(void *private, u32 addr, u32 *vals, size_t num); + void (*write)(void *private, u32 addr, u32 val); + void (*key)(struct zap_private *priv, void *private, int key); + void (*print_header)(void *private); + void (*update_aux)(void *private); + void (*input)(void *private, char mode, const char *str); +}; + +void zap_prompt_input(struct zap_private *priv, char mode, const char *prompt); +void zap(const struct zap *zap, unsigned long start, void *private); + +#endif |