2019-06-15 22:22:44 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
|
|
#include "terminal.h"
|
|
|
|
|
|
|
|
|
|
void vt_from_slave(struct terminal *term, const uint8_t *data, size_t len);
|
2019-07-15 15:42:00 +02:00
|
|
|
bool vt_to_slave(struct terminal *term, const void *data, size_t len);
|
2019-07-10 16:03:18 +02:00
|
|
|
|
|
|
|
|
static inline int
|
|
|
|
|
vt_param_get(const struct terminal *term, size_t idx, int default_value)
|
|
|
|
|
{
|
|
|
|
|
if (term->vt.params.idx > idx) {
|
|
|
|
|
int value = term->vt.params.v[idx].value;
|
|
|
|
|
return value != 0 ? value : default_value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return default_value;
|
|
|
|
|
}
|