MMDVM/Utils.h

40 lines
1.1 KiB
C
Raw Permalink Normal View History

2016-01-14 19:57:21 +01:00
/*
2020-10-14 11:52:30 +02:00
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
2016-01-14 19:57:21 +01:00
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(UTILS_H)
#define UTILS_H
#if defined(STM32F4XX)
2016-11-07 21:09:35 +01:00
#include "stm32f4xx.h"
#elif defined(STM32F7XX)
#include "stm32f7xx.h"
2016-11-07 21:09:35 +01:00
#else
2016-01-14 19:57:21 +01:00
#include <Arduino.h>
2016-11-07 21:09:35 +01:00
#endif
2016-01-14 19:57:21 +01:00
uint8_t countBits8(uint8_t bits);
2020-10-14 11:52:30 +02:00
uint8_t countBits16(uint16_t bits);
2016-01-14 19:57:21 +01:00
uint8_t countBits32(uint32_t bits);
uint8_t countBits64(uint64_t bits);
#endif