void telemetryWrite(uint8_t ch) { tx1Buffer[tx1BufferHead] = ch; tx1BufferHead = (tx1BufferHead + 1) % UART1_BUFFER_SIZE; uart1TxDMA(); }
void DMA2_Stream7_IRQHandler(void) { DMA_ClearITPendingBit(DMA2_Stream7, DMA_IT_TCIF7); tx1DmaEnabled = false; uart1TxDMA(); }
void DMA1_Channel4_IRQHandler(void) { DMA_ClearITPendingBit(DMA1_IT_TC4); DMA_Cmd(DMA1_Channel4, DISABLE); tx1DmaEnabled = false; uart1TxDMA(); }
void telemetryPrint(char *str) { while (*str) { tx1Buffer[tx1BufferHead] = *str++; tx1BufferHead = (tx1BufferHead + 1) % UART1_BUFFER_SIZE; } uart1TxDMA(); }
void uart1PrintBinary(uint8_t *buf, uint16_t length) { uint16_t i; for (i = 0; i < length; i++) { tx1Buffer[tx1BufferHead] = buf[i]; tx1BufferHead = (tx1BufferHead + 1) % UART1_BUFFER_SIZE; } uart1TxDMA(); }