#include "flashsim.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <assert.h>
Go to the source code of this file.
|
#define | cprintf(colors, fmt, args...) printf(fmt , ## args) |
|
#define | cprintf_end(fmt, args...) printf(fmt "\n" , ## args) |
|
Definition at line 29 of file flashsim.c.
Data Fields |
FILE * |
fh |
|
int |
sector_size |
|
int |
size |
|
#define cprintf |
( |
|
colors, |
|
|
|
fmt, |
|
|
|
args... |
|
) |
| printf(fmt , ## args) |
#define cprintf_end |
( |
|
fmt, |
|
|
|
args... |
|
) |
| printf(fmt "\n" , ## args) |
void flashsim_close |
( |
struct flashsim * |
sim | ) |
|
struct flashsim* flashsim_open |
( |
const char * |
name, |
|
|
int |
size, |
|
|
int |
sector_size |
|
) |
| |
void flashsim_program |
( |
struct flashsim * |
sim, |
|
|
int |
addr, |
|
|
const uint8_t * |
buf, |
|
|
int |
len |
|
) |
| |
void flashsim_read |
( |
struct flashsim * |
sim, |
|
|
int |
addr, |
|
|
uint8_t * |
buf, |
|
|
int |
len |
|
) |
| |
void flashsim_sector_erase |
( |
struct flashsim * |
sim, |
|
|
int |
addr |
|
) |
| |