You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
421 B

  1. #pragma once
  2. #include <stdint.h>
  3. #include <stddef.h>
  4. #include "terminal.h"
  5. void vt_from_slave(struct terminal *term, const uint8_t *data, size_t len);
  6. static inline int
  7. vt_param_get(const struct terminal *term, size_t idx, int default_value)
  8. {
  9. if (term->vt.params.idx > idx) {
  10. int value = term->vt.params.v[idx].value;
  11. return value != 0 ? value : default_value;
  12. }
  13. return default_value;
  14. }