Minor visual arrangements

This commit is contained in:
EmanuelFeru
2020-06-23 19:53:35 +02:00
parent 1e7bf7cd90
commit 19aee79e57
6 changed files with 43 additions and 43 deletions

View File

@@ -20,9 +20,29 @@
#include "gd32f1x0_i2c.h"
#include "i2c_it.h"
#include "util.h"
#include "systick.h"
#include "config.h"
#include "defines.h"
extern volatile int8_t i2c_status;
extern volatile i2c_cmd i2c_ReadWriteCmd;
extern volatile uint8_t i2c_slaveAddress;
extern volatile uint8_t i2c_regAddress;
extern volatile uint8_t* i2c_txbuffer;
extern volatile uint8_t* i2c_rxbuffer;
extern volatile uint8_t i2c_nDABytes;
extern volatile int8_t i2c_nRABytes;
#ifdef AUX45_USE_I2C
extern volatile int8_t i2c_aux_status;
extern volatile i2c_cmd i2c_aux_ReadWriteCmd;
extern volatile uint8_t i2c_aux_slaveAddress;
extern volatile uint8_t i2c_aux_regAddress;
extern volatile uint8_t* i2c_aux_txbuffer;
extern volatile uint8_t* i2c_aux_rxbuffer;
extern volatile uint8_t i2c_aux_nDABytes;
extern volatile int8_t i2c_aux_nRABytes;
#endif
void I2C0_EventIRQ_Handler(void)

View File

@@ -26,7 +26,7 @@
#include "util.h"
// Global variables
extern volatile ErrStatus status;
// Private variables
static rcu_periph_enum USART_CLK[USARTn] = { USART_AUX_CLK,

View File

@@ -36,6 +36,7 @@ SerialSideboard Sideboard;
#if defined(SERIAL_DEBUG) || defined(SERIAL_FEEDBACK)
static uint8_t rx_buffer[SERIAL_BUFFER_SIZE]; // USART Rx DMA circular buffer
static uint32_t rx_buffer_len = ARRAY_LEN(rx_buffer);
static uint32_t old_pos;
#endif
#ifdef SERIAL_FEEDBACK
@@ -178,7 +179,6 @@ void input_init(void) {
void usart_rx_check(void)
{
#ifdef SERIAL_DEBUG
static uint32_t old_pos;
uint32_t pos;
pos = rx_buffer_len - dma_transfer_number_get(DMA_CH4); // Calculate current position in buffer
@@ -199,7 +199,6 @@ void usart_rx_check(void)
#endif // SERIAL_DEBUG
#ifdef SERIAL_FEEDBACK
static uint32_t old_pos;
uint32_t pos;
uint8_t *ptr;