stm32f1/lib/sensor_gm1351.h

34 lines
1.3 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 read measurements from GM1351 sound level meter
* @file
* @author King Kévin <kingkevin@cuvoodoo.info>
* @date 2020
* @note peripherals used: GPIO @ref sensor_gm1351_gpio, SPI @ref sensor_gm1351_spi
*/
/** measurement displayed on meter LCD */
extern uint16_t sensor_gm1351_decidba;
/** flag set when valid measurement has been received */
extern volatile bool sensor_gm1351_received_flag;
/** initialise interface to GM1351 sound level meter */
void sensor_gm1351_setup(void);
/** switch power of meter
* @warning: the device will power off after 10 minutes
*/
void sensor_gm1351_power_toggle(void);