-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#379 Added missing file and updated tests
- Loading branch information
1 parent
3d23111
commit 59b6b85
Showing
6 changed files
with
122 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* || ____ _ __ | ||
* +------+ / __ )(_) /_______________ _____ ___ | ||
* | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ | ||
* +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ | ||
* || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ | ||
* | ||
* Crazyflie control firmware | ||
* | ||
* Copyright (C) 2018 Bitcraze AB | ||
* | ||
* 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, in version 3. | ||
* | ||
* 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/>. | ||
* | ||
* Platform functionality for the TAG platform | ||
*/ | ||
|
||
#define DEBUG_MODULE "PLATFORM" | ||
|
||
#include <string.h> | ||
|
||
#include "platform.h" | ||
#include "exti.h" | ||
#include "nvic.h" | ||
#include "debug.h" | ||
|
||
static platformConfig_t configs[] = { | ||
{ | ||
.deviceType = "RR10", | ||
.deviceTypeName = "Roadrunner 1.0", | ||
.sensorImplementation = SensorImplementation_bmi088_bmp388, | ||
.physicalLayoutAntennasAreClose = false, | ||
}, | ||
}; | ||
|
||
const platformConfig_t* platformGetListOfConfigurations(int* nrOfConfigs) { | ||
*nrOfConfigs = sizeof(configs) / sizeof(platformConfig_t); | ||
return configs; | ||
} | ||
|
||
void platformInitHardware() { | ||
//Low level init: Clock and Interrupt controller | ||
nvicInit(); | ||
|
||
//EXTI interrupts | ||
extiInit(); | ||
} | ||
|
||
|
||
// Config functions ------------------------ | ||
|
||
const char* platformConfigGetPlatformName() { | ||
return "tag"; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* || ____ _ __ | ||
* +------+ / __ )(_) /_______________ _____ ___ | ||
* | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ | ||
* +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ | ||
* || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ | ||
* | ||
* Crazyflie control firmware | ||
* | ||
* Copyright (C) 2018 Bitcraze AB | ||
* | ||
* 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, in version 3. | ||
* | ||
* 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/>. | ||
* | ||
* Platform utilities | ||
* | ||
*/ | ||
|
||
#define DEBUG_MODULE "PLATFORM" | ||
|
||
#include "platform.h" | ||
#include "radiolink.h" | ||
#include "debug.h" | ||
|
||
// Define to decrease the nRF51 Tx power to reduce interference | ||
#ifndef PLATFORM_NRF51_LOW_INTERFERENCE_TX_POWER_DBM | ||
#define PLATFORM_NRF51_LOW_INTERFERENCE_TX_POWER_DBM (-12) | ||
#endif | ||
|
||
|
||
void platformSetLowInterferenceRadioMode(void) { | ||
// Decrease the nRF51 Tx power to reduce interference | ||
radiolinkSetPowerDbm(PLATFORM_NRF51_LOW_INTERFERENCE_TX_POWER_DBM); | ||
DEBUG_PRINT("Low interference mode. NRF51 TX power offset by %ddb.\r\n", PLATFORM_NRF51_LOW_INTERFERENCE_TX_POWER_DBM); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters