#include "C_LinkCube.h" #include "../LinkCube.hpp" extern "C" { C_LinkCubeHandle C_LinkCube_create() { return new LinkCube(); } void C_LinkCube_destroy(C_LinkCubeHandle handle) { delete static_cast(handle); } bool C_LinkCube_isActive(C_LinkCubeHandle handle) { return static_cast(handle)->isActive(); } void C_LinkCube_activate(C_LinkCubeHandle handle) { static_cast(handle)->activate(); } void C_LinkCube_deactivate(C_LinkCubeHandle handle) { static_cast(handle)->deactivate(); } bool C_LinkCube_wait(C_LinkCubeHandle handle) { return static_cast(handle)->wait(); } bool C_LinkCube_waitWithCancel(C_LinkCubeHandle handle, bool (*cancel)()) { return static_cast(handle)->wait(cancel); } bool C_LinkCube_canRead(C_LinkCubeHandle handle) { return static_cast(handle)->canRead(); } u32 C_LinkCube_read(C_LinkCubeHandle handle) { return static_cast(handle)->read(); } u32 C_LinkCube_peek(C_LinkCubeHandle handle) { return static_cast(handle)->peek(); } void C_LinkCube_send(C_LinkCubeHandle handle, u32 data) { static_cast(handle)->send(data); } u32 C_LinkCube_pendingCount(C_LinkCubeHandle handle) { return static_cast(handle)->pendingCount(); } bool C_LinkCube_didQueueOverflow(C_LinkCubeHandle handle, bool clear) { return static_cast(handle)->didQueueOverflow(clear); } bool C_LinkCube_didReset(C_LinkCubeHandle handle, bool clear) { return static_cast(handle)->didReset(clear); } void C_LinkCube_onSerial(C_LinkCubeHandle handle) { static_cast(handle)->_onSerial(); } }