/*
 * commprt.h
 *
 *  Created on: Jan 25, 2022
 *      Author: radioman
 */

#ifndef INC_COMMPRT_H_
#define INC_COMMPRT_H_

#include <stdint.h>

typedef enum { COMM_BT, COMM_USB } COMM_IfaceTypeDef;
typedef enum { COMM_OK, COMM_FAIL, COMM_TIMEOUT, COMM_CHECKSUM_MISTMATCH } COMM_StatusTypeDef;

COMM_StatusTypeDef COMM_Receive(uint8_t *buf, COMM_IfaceTypeDef iface, uint32_t timeout);

COMM_StatusTypeDef COMM_Transmit(uint8_t *data, uint8_t len, COMM_IfaceTypeDef iface);

#endif /* INC_COMMPRT_H_ */
