/* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /* Copyright (c) 2016 King Kévin */ /* this library handles the communication with a HC-05 bluetooth module */ /* peripherals used: USART (check source for details) */ #pragma once /* RX and TX buffer sizes */ #define BT_BUFFER 128 /* show the user how much received is available */ extern volatile uint8_t bt_received; /* display configuration of bluetooth module */ void bt_info(void); /* setup communication to bluetooth module */ void bt_setup(void); /* send character over bluetooth (blocking) */ void bt_putchar_blocking(char c); /* ensure all data has been transmitted (blocking) */ void bt_flush(void); /* get character received over bluetooth (blocking) */ char bt_getchar(void); /* send character over bluetooth (non-blocking until buffer is full) */ void bt_putchar_nonblocking(char c);