diff --git a/include/gb.h b/include/gb.h index 4c70d00..cd4eb8c 100644 --- a/include/gb.h +++ b/include/gb.h @@ -21,7 +21,9 @@ typedef struct gb_timers_t { } GBTimers; GBTimers *gb_timers_open(RIO *io); -void gb_timers_open(RIO *io, GBTimers); +void gb_timers_close(RIO *io, GBTimers *timers); void gb_timers_update(GBTimers *timers, ut32 cycles); +extern RIOPlugin r_io_plugin_gb_timers; + #endif diff --git a/io/timers.c b/io/timers.c index c68503a..2b80f9f 100644 --- a/io/timers.c +++ b/io/timers.c @@ -51,9 +51,9 @@ static bool __close(RIODesc *desc) { static int __write(RIO *io, RIODesc *desc, const ut8 *buf, int len) { GBTimers *timers = (GBTimers *)desc->data; if (timers->seek == 4) { - return NULL; + return 0; } - int wlen = R_MIN (len, 4 - timers->seek) + int wlen = R_MIN (len, 4 - timers->seek); ut64 endseek = timers->seek + wlen; ut32 i; for (i = 0; timers->seek < endseek; timers->seek++) {