Fixed Singularity target.

This commit is contained in:
Martin Budden 2016-06-14 16:20:50 +01:00
parent e95eee9a0d
commit df9a0f186f
5 changed files with 25 additions and 21 deletions

View File

@ -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);

View File

@ -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);
void rtc6705SetFreq(uint16_t freq);

View File

@ -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
#endif

View File

@ -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();
void vtxInit(void);
void vtxIncrementBand(void);
void vtxDecrementBand(void);
void vtxIncrementChannel(void);
void vtxDecrementChannel(void);
void vtxUpdateActivatedChannel(void);

View File

@ -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