Revert external module baudrate configurable

This commit is contained in:
Bertrand Songis
2019-03-25 20:07:06 +01:00
parent 0c99545b27
commit 686e95a294
3 changed files with 2 additions and 26 deletions
+1 -14
View File
@@ -154,17 +154,8 @@ void extmoduleInvertedSerialStart(uint32_t baudrate)
NVIC_EnableIRQ(EXTMODULE_USART_IRQn);
}
// TODO remove this when we have adaptative speed
uint32_t externalModuleBaudrate = 230400;
uint32_t currentExternalModuleBaudrate = 230400;
void extmoduleSendBuffer(const uint8_t * data, uint8_t size)
{
// TODO remove this when we have adaptative speed
if (externalModuleBaudrate != currentExternalModuleBaudrate) {
extmodulePxx2Start();
}
DMA_InitTypeDef DMA_InitStructure;
DMA_DeInit(EXTMODULE_USART_DMA_STREAM);
DMA_InitStructure.DMA_Channel = EXTMODULE_USART_DMA_CHANNEL;
@@ -213,11 +204,7 @@ extern "C" void EXTMODULE_USART_IRQHandler(void)
void extmodulePxx2Start()
{
// TODO remove this when we have adaptative speed
currentExternalModuleBaudrate = externalModuleBaudrate;
extmoduleInvertedSerialStart(externalModuleBaudrate);
// extmoduleInvertedSerialStart(EXTMODULE_USART_PXX2_BAUDRATE);
extmoduleInvertedSerialStart(EXTMODULE_USART_PXX2_BAUDRATE);
}
#else
void extmodulePxx2Start()
+1 -1
View File
@@ -179,7 +179,7 @@ uint8_t eepromIsTransferComplete()
* @param NumByteToWrite : number of bytes to write to the EEPROM.
* @retval None
*/
bool I2C_EE_PageWrite(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t NumByteToWrite)
bool I2C_EE_PageWrite(uint8_t * pBuffer, uint16_t WriteAddr, uint8_t NumByteToWrite)
{
if (!I2C_WaitEventCleared(I2C_FLAG_BUSY))
return false;