This commit is contained in:
2017-06-28 20:40:01 +02:00
parent 76dd61f48b
commit 8d2b664149
41 changed files with 5225 additions and 0 deletions

29
kawaii/emergency_stop.cpp Normal file
View File

@@ -0,0 +1,29 @@
//
// Created by Simon Wörner on 16.06.17.
//
#include "emergency_stop.h"
#include <cstddef>
extern "C" {
void *emergency_stop_init(uint8_t port);
void emergency_stop_clean(void *emergency_stop);
bool emergency_stop_get_state(void *emergency_stop);
}
emergency_stop::emergency_stop(uint8_t port)
{
rust_emergency_stop = emergency_stop_init(port);
}
emergency_stop::~emergency_stop()
{
emergency_stop_clean(rust_emergency_stop);
rust_emergency_stop = NULL;
}
bool emergency_stop::get_state() const
{
return emergency_stop_get_state(rust_emergency_stop);
}