stm32f1/lib/spp_rx.h

34 lines
1.2 KiB
C

/* 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 <http://www.gnu.org/licenses/>.
*
*/
/** library to receive data from a Bluetooth SPP module
* @file
* @author King Kévin <kingkevin@cuvoodoo.info>
* @date 2016-2020
* @note peripherals used: USART @ref spp_uart
*/
#pragma once
/** flag set when data has been received and is available */
extern volatile bool spp_rx_input_available;
/** setup UART peripheral */
void spp_rx_setup(void);
/** get the data received from Bluetooth SPP module
* @return available data
* @warning returns 0 when no data is available
* @note sets spp_rx_input_available to indicate if more data is available
*/
char spp_rx_input_get(void);