diff --git a/src/main/drivers/vtx_rtc6705.c b/src/main/drivers/vtx_rtc6705.c index 4bdaf9931d..423bd94ed6 100644 --- a/src/main/drivers/vtx_rtc6705.c +++ b/src/main/drivers/vtx_rtc6705.c @@ -100,7 +100,7 @@ static const uint32_t channelArray[RTC6705_BAND_MAX][RTC6705_CHANNEL_MAX] = { * Send a command and return if good * TODO chip detect */ -static bool rtc6705IsReady() +static bool rtc6705IsReady(void) { // Sleep a little bit to make sure it has booted delay(50); @@ -115,7 +115,8 @@ static bool rtc6705IsReady() * This is easier for when generating the frequency to then * reverse the bits afterwards */ -static uint32_t reverse32(uint32_t in) { +static uint32_t reverse32(uint32_t in) +{ uint32_t out = 0; for (uint8_t i = 0 ; i < 32 ; i++) @@ -129,7 +130,7 @@ static uint32_t reverse32(uint32_t in) { /** * Start chip if available */ -bool rtc6705Init() +bool rtc6705Init(void) { DISABLE_RTC6705; spiSetDivisor(RTC6705_SPI_INSTANCE, SPI_0_5625MHZ_CLOCK_DIVIDER); diff --git a/src/main/drivers/vtx_rtc6705.h b/src/main/drivers/vtx_rtc6705.h index d72116659f..5f1614fffd 100644 --- a/src/main/drivers/vtx_rtc6705.h +++ b/src/main/drivers/vtx_rtc6705.h @@ -33,6 +33,6 @@ #define RTC6705_FREQ_MIN 5600 #define RTC6705_FREQ_MAX 5950 -bool rtc6705Init(); +bool rtc6705Init(void); void rtc6705SetChannel(uint8_t band, uint8_t channel); -void rtc6705SetFreq(uint16_t freq); \ No newline at end of file +void rtc6705SetFreq(uint16_t freq); diff --git a/src/main/io/vtx.c b/src/main/io/vtx.c index 3a48bc1a67..cfccf5c5d1 100644 --- a/src/main/io/vtx.c +++ b/src/main/io/vtx.c @@ -35,6 +35,8 @@ #include "drivers/timer.h" #include "drivers/pwm_rx.h" #include "drivers/serial.h" +#include "drivers/vtx_rtc6705.h" + #include "sensors/sensors.h" #include "sensors/gyro.h" @@ -72,7 +74,7 @@ static uint8_t locked = 0; -void vtxInit() +void vtxInit(void) { rtc6705Init(); if (masterConfig.vtx_mode == 0) { @@ -100,27 +102,27 @@ static void setChannelSaveAndNotify(uint8_t *bandOrChannel, uint8_t step, int32_ } } -void vtxIncrementBand() +void vtxIncrementBand(void) { setChannelSaveAndNotify(&(masterConfig.vtx_band), 1, RTC6705_BAND_MIN, RTC6705_BAND_MAX); } -void vtxDecrementBand() +void vtxDecrementBand(void) { setChannelSaveAndNotify(&(masterConfig.vtx_band), -1, RTC6705_BAND_MIN, RTC6705_BAND_MAX); } -void vtxIncrementChannel() +void vtxIncrementChannel(void) { setChannelSaveAndNotify(&(masterConfig.vtx_channel), 1, RTC6705_CHANNEL_MIN, RTC6705_CHANNEL_MAX); } -void vtxDecrementChannel() +void vtxDecrementChannel(void) { setChannelSaveAndNotify(&(masterConfig.vtx_channel), -1, RTC6705_CHANNEL_MIN, RTC6705_CHANNEL_MAX); } -void vtxUpdateActivatedChannel() +void vtxUpdateActivatedChannel(void) { if (ARMING_FLAG(ARMED)) { locked = 1; @@ -143,4 +145,5 @@ void vtxUpdateActivatedChannel() } } -#endif \ No newline at end of file +#endif + diff --git a/src/main/io/vtx.h b/src/main/io/vtx.h index ddcd7492de..d49c2c7078 100644 --- a/src/main/io/vtx.h +++ b/src/main/io/vtx.h @@ -17,8 +17,6 @@ #pragma once -#include "drivers/vtx_rtc6705.h" - #define VTX_BAND_MIN 1 #define VTX_BAND_MAX 5 #define VTX_CHANNEL_MIN 1 @@ -32,9 +30,10 @@ typedef struct vtxChannelActivationCondition_s { channelRange_t range; } vtxChannelActivationCondition_t; -void vtxInit(); -void vtxIncrementBand(); -void vtxDecrementBand(); -void vtxIncrementChannel(); -void vtxDecrementChannel(); -void vtxUpdateActivatedChannel(); \ No newline at end of file +void vtxInit(void); +void vtxIncrementBand(void); +void vtxDecrementBand(void); +void vtxIncrementChannel(void); +void vtxDecrementChannel(void); +void vtxUpdateActivatedChannel(void); + diff --git a/src/main/target/SINGULARITY/target.mk b/src/main/target/SINGULARITY/target.mk index 5e0b22cbe6..1cd4fcd942 100644 --- a/src/main/target/SINGULARITY/target.mk +++ b/src/main/target/SINGULARITY/target.mk @@ -7,5 +7,6 @@ TARGET_SRC = \ drivers/light_ws2811strip.c \ drivers/light_ws2811strip_stm32f30x.c \ drivers/serial_softserial.c \ - drivers/vtx_rtc6705.c + drivers/vtx_rtc6705.c \ + io/vtx.c