Skip to content
Snippets Groups Projects
Commit 82074a7b authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

Add finish bindings

parent d450814d
Branches
Tags
No related merge requests found
......@@ -437,7 +437,7 @@ class Cycle {
~Cycle(); // End of cycle = destructor
void abort();
//void ...don't receive segfault...
void silent_finish();
Cycle& read (address_t address, data_t* data = 0);
Cycle& write(address_t address, data_t data);
......@@ -457,6 +457,9 @@ class Cycle {
class Operation {
public:
bool is_null () const;
/* Only call these if is_null is false */
bool is_read () const;
bool is_config() const;
bool had_error() const;
......@@ -562,6 +565,12 @@ inline void Cycle::abort() {
cycle = EB_NULL;
}
inline void Cycle::silent_finish() {
if (cycle != EB_NULL)
eb_cycle_close_silently(cycle);
cycle = EB_NULL;
}
inline Cycle& Cycle::read(address_t address, data_t* data) {
eb_cycle_read(cycle, address, data);
return *this;
......@@ -590,6 +599,10 @@ inline Operation::Operation(eb_operation_t op)
: operation(op) {
}
inline bool Operation::is_null() const {
return operation == EB_NULL;
}
inline bool Operation::is_read() const {
return eb_operation_is_read(operation);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment