Use void* for pulses
This commit is contained in:
@@ -208,7 +208,7 @@ void extmoduleSerialStart()
|
|||||||
NVIC_SetPriority(EXTMODULE_TIMER_DMA_STREAM_IRQn, 7);
|
NVIC_SetPriority(EXTMODULE_TIMER_DMA_STREAM_IRQn, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void extmoduleSendNextFramePpm(uint32_t* pulses, uint16_t length,
|
static void extmoduleSendNextFramePpm(void* pulses, uint16_t length,
|
||||||
uint16_t trailing_pulse)
|
uint16_t trailing_pulse)
|
||||||
{
|
{
|
||||||
#if defined(PCBX10) || PCBREV >= 13
|
#if defined(PCBX10) || PCBREV >= 13
|
||||||
@@ -243,7 +243,7 @@ static void extmoduleSendNextFramePpm(uint32_t* pulses, uint16_t length,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PXX1)
|
#if defined(PXX1)
|
||||||
void extmoduleSendNextFramePxx1(const uint32_t* pulses, uint16_t length)
|
void extmoduleSendNextFramePxx1(const void* pulses, uint16_t length)
|
||||||
{
|
{
|
||||||
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ void extmoduleSendNextFramePxx1(const uint32_t* pulses, uint16_t length)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
||||||
void extmoduleSendNextFrameAFHDS3(const uint16_t* dataPtr, uint16_t dataSize)
|
void extmoduleSendNextFrameAFHDS3(const void* dataPtr, uint16_t dataSize)
|
||||||
{
|
{
|
||||||
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ void extmoduleSendNextFrameAFHDS3(const uint16_t* dataPtr, uint16_t dataSize)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void extmoduleSendNextFrameSoftSerial100kbit(const uint32_t* pulses, uint16_t length)
|
void extmoduleSendNextFrameSoftSerial100kbit(const void* pulses, uint16_t length)
|
||||||
{
|
{
|
||||||
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
||||||
|
|
||||||
|
|||||||
@@ -28,17 +28,17 @@ void extmodulePpmStart();
|
|||||||
|
|
||||||
#if defined(PXX1)
|
#if defined(PXX1)
|
||||||
void extmodulePxx1PulsesStart();
|
void extmodulePxx1PulsesStart();
|
||||||
void extmoduleSendNextFramePxx1(const uint32_t* pulses, uint16_t length);
|
void extmoduleSendNextFramePxx1(const void* pulses, uint16_t length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Soft serial on PPM pin
|
// Soft serial on PPM pin
|
||||||
void extmoduleSerialStart();
|
void extmoduleSerialStart();
|
||||||
|
|
||||||
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
||||||
void extmoduleSendNextFrameAFHDS3(const uint16_t* dataPtr, uint16_t dataSize);
|
void extmoduleSendNextFrameAFHDS3(const void* dataPtr, uint16_t dataSize);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void extmoduleSendNextFrameSoftSerial100kbit(const uint32_t* pulses, uint16_t length);
|
void extmoduleSendNextFrameSoftSerial100kbit(const void* pulses, uint16_t length);
|
||||||
|
|
||||||
// Bitbang serial
|
// Bitbang serial
|
||||||
void extmoduleSendInvertedByte(uint8_t byte);
|
void extmoduleSendInvertedByte(uint8_t byte);
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ void extmodulePxx1SerialStart()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void extmoduleSendNextFramePpm(uint16_t* pulses, uint16_t length,
|
static void extmoduleSendNextFramePpm(const void* pulses, uint16_t length,
|
||||||
uint16_t trailing_pulse)
|
uint16_t trailing_pulse)
|
||||||
{
|
{
|
||||||
EXTMODULE_TIMER->CCR1 = GET_MODULE_PPM_DELAY(EXTERNAL_MODULE) * 2;
|
EXTMODULE_TIMER->CCR1 = GET_MODULE_PPM_DELAY(EXTERNAL_MODULE) * 2;
|
||||||
@@ -184,7 +184,7 @@ static void extmoduleSendNextFramePpm(uint16_t* pulses, uint16_t length,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PXX1)
|
#if defined(PXX1)
|
||||||
void extmoduleSendNextFramePxx1(const uint16_t* pulses, uint16_t length)
|
void extmoduleSendNextFramePxx1(const void* pulses, uint16_t length)
|
||||||
{
|
{
|
||||||
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ void extmoduleSendNextFramePxx1(const uint16_t* pulses, uint16_t length)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
||||||
void extmoduleSendNextFrameAFHDS3(const uint16_t* dataPtr, uint16_t dataSize)
|
void extmoduleSendNextFrameAFHDS3(const void* dataPtr, uint16_t dataSize)
|
||||||
{
|
{
|
||||||
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ void extmoduleSendNextFrameAFHDS3(const uint16_t* dataPtr, uint16_t dataSize)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void extmoduleSendNextFrameSoftSerial100kbit(const uint16_t* pulses, uint16_t length)
|
void extmoduleSendNextFrameSoftSerial100kbit(const void* pulses, uint16_t length)
|
||||||
{
|
{
|
||||||
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
if (EXTMODULE_TIMER_DMA_STREAM->CR & DMA_SxCR_EN) return;
|
||||||
|
|
||||||
|
|||||||
@@ -28,17 +28,17 @@ void extmodulePpmStart();
|
|||||||
|
|
||||||
#if defined(PXX1)
|
#if defined(PXX1)
|
||||||
void extmodulePxx1PulsesStart();
|
void extmodulePxx1PulsesStart();
|
||||||
void extmoduleSendNextFramePxx1(const uint16_t* pulses, uint16_t length);
|
void extmoduleSendNextFramePxx1(const void* pulses, uint16_t length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Soft serial on PPM pin
|
// Soft serial on PPM pin
|
||||||
void extmoduleSerialStart();
|
void extmoduleSerialStart();
|
||||||
|
|
||||||
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
#if defined(AFHDS3) && !(defined(EXTMODULE_USART) && defined(EXTMODULE_TX_INVERT_GPIO))
|
||||||
void extmoduleSendNextFrameAFHDS3(const uint16_t* dataPtr, uint16_t dataSize);
|
void extmoduleSendNextFrameAFHDS3(const void* dataPtr, uint16_t dataSize);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void extmoduleSendNextFrameSoftSerial100kbit(const uint16_t* pulses, uint16_t length);
|
void extmoduleSendNextFrameSoftSerial100kbit(const void* pulses, uint16_t length);
|
||||||
|
|
||||||
// Bitbang serial
|
// Bitbang serial
|
||||||
void extmoduleSendInvertedByte(uint8_t byte);
|
void extmoduleSendInvertedByte(uint8_t byte);
|
||||||
|
|||||||
Reference in New Issue
Block a user