-
Notifications
You must be signed in to change notification settings - Fork 1
/
bus_event_listener.h
24 lines (22 loc) · 967 Bytes
/
bus_event_listener.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// *** WARNING ***
// This file is generated by genevents.rb
// Keep untouched or ruin the abstraction
#pragma once
#include "utils.h"
#include "bus.h"
#include "interrupts.h"
typedef void (*bus_event_callback_on_int_asserted_t)(void *context, interruption_type_t target);
typedef void (*bus_event_callback_on_int_acked_t)(void *context, interruption_type_t target);
typedef void (*bus_event_callback_on_oamdma_t)(void *context, uint16_t addr);
typedef void (*bus_event_callback_on_dmcdma_t)(void *context, uint16_t addr);
typedef struct bus_event_listener {
void *context;
// called on interrupt line is asseted
bus_event_callback_on_int_asserted_t on_int_asserted;
// called on interrupt line is acknowledged
bus_event_callback_on_int_acked_t on_int_acked;
// called on OAMDMA is started
bus_event_callback_on_oamdma_t on_oamdma;
// called on DMCDMA is started
bus_event_callback_on_dmcdma_t on_dmcdma;
} bus_event_listener_t;