shithub: m8c

ref: 77d211a56fd2689b5927e1aaa9f316d2d7848f4c
dir: /src/serial.h/

View raw version
// Copyright 2021 Jonne Kokkonen
// Released under the MIT licence, https://opensource.org/licenses/MIT

#ifndef _SERIAL_H_
#define _SERIAL_H_
#ifdef USE_LIBSERIALPORT

#include <stdint.h>
#include "config.h"

// maximum amount of bytes to read from the serial in one read()
#define serial_read_size 1024

int init_serial(int verbose, const char *preferred_device);
int destroy_serial();
int list_devices();
int check_serial_port();
int reset_display();
int enable_and_reset_display();
int disconnect();
int serial_read(uint8_t *serial_buf, int count);
int send_msg_controller(uint8_t input);
int send_msg_keyjazz(uint8_t note, uint8_t velocity);
int process_serial(config_params_s conf);

#endif
#endif