shithub: m8c

ref: d750ca7c0c55188ea4afb8103c9708ab11345002
dir: /src/backends/serialport.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 "../config.h"
#include <stdint.h>

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

int m8_connect(int verbose, const char *preferred_device);
int m8_close();
int m8_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