Switch to CMake

This commit is contained in:
Bertrand Songis
2015-12-21 23:43:18 +01:00
parent c8358d7e37
commit 88841f63ca
94 changed files with 1553 additions and 956 deletions
+3 -1
View File
@@ -180,6 +180,8 @@ void init_pxx( uint32_t module_index );
void disable_pxx( uint32_t module_index );
void init_dsm2( uint32_t module_index );
void disable_dsm2( uint32_t module_index );
void init_crossfire( uint32_t module_index );
void disable_crossfire( uint32_t module_index );
// Trainer driver
void init_trainer_ppm(void);
@@ -217,7 +219,7 @@ void watchdogInit(unsigned int duration);
// ADC driver
void adcInit(void);
void adcRead(void);
inline uint16_t getAnalogValue(uint32_t value);
uint16_t getAnalogValue(uint32_t value);
#if defined(REV3)
#define BATT_SCALE 120
+2 -3
View File
@@ -7,9 +7,8 @@
#include "diskio.h"
#include <string.h> // memcpy
#include "../horus/sdio_sd.h"
#include "stm32f4xx.h"
#include "../../opentx.h"
#include "sdio_sd.h"
#define BLOCK_SIZE 512 /* Block Size in Bytes */
@@ -92,6 +92,14 @@ void disable_no_pulses(uint32_t port)
TIM1->CR1 &= ~TIM_CR1_CEN ;
}
void init_crossfire(uint32_t port)
{
}
void disable_crossfire(uint32_t port)
{
}
void init_pxx(uint32_t port)
{
EXTERNAL_MODULE_ON();
@@ -36,8 +36,6 @@
#include "../../opentx.h"
extern Fifo<512> telemetryFifo;
void telemetryPortInit(uint32_t baudrate)
{
if (baudrate == 0) {
+2 -2
View File
@@ -29,12 +29,12 @@
#pragma data_alignment = 4
#endif /* USB_OTG_HS_INTERNAL_DMA_ENABLED */
#include "opentx.h"
#include "../../opentx.h"
extern "C" {
/* Includes ------------------------------------------------------------------*/
#include "../horus/usb_conf.h"
#include "usb_conf.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
+3 -3
View File
@@ -26,12 +26,12 @@
*/
/* Includes ------------------------------------------------------------------*/
#include "../horus/usbd_desc.h"
#include "usbd_desc.h"
#include <string.h>
#include "../horus/board_horus.h"
#include "../horus/usbd_conf.h"
#include "board_horus.h"
#include "usbd_conf.h"
#include "usbd_core.h"
#include "usbd_req.h"
#include "usb_regs.h"
+11
View File
@@ -0,0 +1,11 @@
set(SRC ${SRC} simu.cpp targets/simu/simpgmspace.cpp)
foreach(FILE ${SRC})
set(SIMU_SRC ${SIMU_SRC} ../../${FILE})
endforeach()
add_definitions(-DSIMU)
add_executable(simu WIN32 ${SIMU_SRC} )
add_dependencies(simu ${FIRMWARE_DEPENDENCIES})
target_include_directories(simu PUBLIC /usr/local/include/fox-1.6 PUBLIC /usr/include/fox-1.6 /opt/local/include/fox-1.6)
target_link_libraries(simu FOX-1.6 pthread)
+1 -1
View File
@@ -34,7 +34,7 @@
*
*/
#include "opentx.h"
#include "../../opentx.h"
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
+4 -3
View File
@@ -242,8 +242,8 @@ void checkRotaryEncoder(void);
#if !defined(SIMU)
#define wdt_disable()
void watchdogInit(unsigned int duration);
#define wdt_enable(x) watchdogInit(1500)
#define wdt_reset() IWDG->KR = 0xAAAA
#define wdt_enable(x) watchdogInit(1500)
#define wdt_reset() IWDG->KR = 0xAAAA
#define WAS_RESET_BY_SOFTWARE() (RCC->CSR & RCC_CSR_SFTRSTF)
#define WAS_RESET_BY_WATCHDOG() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF))
#define WAS_RESET_BY_WATCHDOG_OR_SOFTWARE() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF | RCC_CSR_SFTRSTF))
@@ -252,7 +252,7 @@ void watchdogInit(unsigned int duration);
// ADC driver
void adcInit(void);
void adcRead(void);
inline uint16_t getAnalogValue(uint32_t value);
uint16_t getAnalogValue(uint32_t value);
#define BATT_SCALE 150
@@ -372,6 +372,7 @@ void setTopBatteryValue(uint32_t volts);
void usbJoystickUpdate(void);
#endif
extern uint8_t currentTrainerMode;
void checkTrainerSettings(void);
#endif
+1 -5
View File
@@ -34,13 +34,9 @@
*
*/
#include <string.h>
#include "../../opentx.h"
#include "../../thirdparty/FatFs/diskio.h"
#include "../../thirdparty/FatFs/ff.h"
#include "../../thirdparty/CoOS/kernel/CoOS.h"
#include "../../debug.h"
#include "board_taranis.h"
#include "hal.h"
/* Definitions for MMC/SDC command */
#define CMD0 (0x40+0) /* GO_IDLE_STATE */