Removing mbed.h inclusion

It's better to include what we need rather than whole mbed.h.
Small style knits.
pull/12741/head
Hasnain Virk 2019-03-22 17:56:48 +02:00
parent 16958f814d
commit bd00868a82
3 changed files with 11 additions and 3 deletions

View File

@ -332,7 +332,7 @@ void SX1272_LoRaRadio::set_operation_mode(uint8_t mode)
* At initialization FSK is chosen. Later stack or application
* can choose to change.
*/
void SX1272_LoRaRadio::set_modem(uint8_t modem )
void SX1272_LoRaRadio::set_modem(uint8_t modem)
{
if ((read_register(REG_OPMODE) & RFLR_OPMODE_LONGRANGEMODE_ON) != 0 ) {
_rf_settings.modem = MODEM_LORA;

View File

@ -25,7 +25,14 @@ SPDX-License-Identifier: BSD-3-Clause
#include <stdio.h>
#include <math.h> //rint
#include <string.h>
#include "mbed.h"
#include "PinNames.h"
#include "Callback.h"
#include "mbed_wait_api.h"
#include "Timer.h"
#ifdef MBED_CONF_RTOS_PRESENT
#include "ThisThread.h"
using namespace rtos;
#endif
#include "SX1276_LoRaRadio.h"
#include "sx1276Regs-Fsk.h"
#include "sx1276Regs-LoRa.h"
@ -153,6 +160,7 @@ enum RadioVariant {
#define SPI_FREQUENCY 8000000
#endif
using namespace mbed;
/**
* Constructor
*/

View File

@ -382,7 +382,7 @@ private:
// Data buffer used for both TX and RX
// Size of this buffer is configurable via Mbed config system
// Default is 256 bytes
// Default is 255 bytes
uint8_t _data_buffer[MAX_DATA_BUFFER_SIZE_SX1276];
// TX timer in ms. This timer is used as a fail safe for TX.