mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-18 08:43:10 +00:00
389ff92cc1
* Makefile, Scripts: new linter * About: remove ID from IC * Firmware: remove double define for DIVC/DIVR * Scripts: check folder names too. Docker: replace syntax check with make lint. * Reformat Sources and Migrate to new file naming convention * Docker: symlink clang-format-12 to clang-format * Add coding style guide
32 lines
828 B
C++
32 lines
828 B
C++
#include "byte_input_vm.h"
|
|
|
|
ByteInputVM::ByteInputVM() {
|
|
byte_input = byte_input_alloc();
|
|
}
|
|
|
|
ByteInputVM::~ByteInputVM() {
|
|
byte_input_free(byte_input);
|
|
}
|
|
|
|
View* ByteInputVM::get_view() {
|
|
return byte_input_get_view(byte_input);
|
|
}
|
|
|
|
void ByteInputVM::clean() {
|
|
byte_input_set_header_text(byte_input, "");
|
|
byte_input_set_result_callback(byte_input, NULL, NULL, NULL, NULL, 0);
|
|
}
|
|
|
|
void ByteInputVM::set_result_callback(
|
|
ByteInputCallback input_callback,
|
|
ByteChangedCallback changed_callback,
|
|
void* callback_context,
|
|
uint8_t* bytes,
|
|
uint8_t bytes_count) {
|
|
byte_input_set_result_callback(
|
|
byte_input, input_callback, changed_callback, callback_context, bytes, bytes_count);
|
|
}
|
|
|
|
void ByteInputVM::set_header_text(const char* text) {
|
|
byte_input_set_header_text(byte_input, text);
|
|
}
|