aboutsummaryrefslogtreecommitdiff
path: root/client/serial.h
blob: caa3cda44e4d2a1a75147ba6c96e950288b0c752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include "../shared/bool.h"

/** @file serial.h */

/**
 * read byte from serial port
 *
 * @return -1 if read fails, else char read
 */
int w2_serial_read();
/** write `data` with length `length` to serial port */
bool w2_serial_write(char *data, uint8_t length);
/** open serial port */
bool w2_serial_open(const char *port_name);
/** close serial port */
void w2_serial_close();