Skip to content

Commit

Permalink
move counter variables into the ASIC source files
Browse files Browse the repository at this point in the history
  • Loading branch information
skot committed Oct 9, 2024
1 parent 2584fab commit e06108e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions components/asic/bm1366.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ typedef struct __attribute__((__packed__))

static const char * TAG = "bm1366Module";

static uint8_t asic_timeout_counter = 0;
static uint8_t asic_timeout_warning_threshold = 2;
static int uart_timeout_ms = 10000;

static uint8_t asic_response_buffer[SERIAL_BUF_SIZE];
static task_result result;

Expand Down
4 changes: 4 additions & 0 deletions components/asic/bm1368.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ typedef struct __attribute__((__packed__))

static const char * TAG = "bm1368Module";

static uint8_t asic_timeout_counter = 0;
static uint8_t asic_timeout_warning_threshold = 2;
static int uart_timeout_ms = 10000;

static uint8_t asic_response_buffer[CHUNK_SIZE];
static task_result result;

Expand Down
4 changes: 4 additions & 0 deletions components/asic/bm1370.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ typedef struct __attribute__((__packed__))

static const char * TAG = "bm1370Module";

static uint8_t asic_timeout_counter = 0;
static uint8_t asic_timeout_warning_threshold = 2;
static int uart_timeout_ms = 10000;

static uint8_t asic_response_buffer[SERIAL_BUF_SIZE];
static task_result result;

Expand Down
4 changes: 4 additions & 0 deletions components/asic/bm1397.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ typedef struct __attribute__((__packed__))

static const char *TAG = "bm1397Module";

static uint8_t asic_timeout_counter = 0;
static uint8_t asic_timeout_warning_threshold = 2;
static int uart_timeout_ms = 10000;

static uint8_t asic_response_buffer[SERIAL_BUF_SIZE];
static uint32_t prev_nonce = 0;
static task_result result;
Expand Down
4 changes: 0 additions & 4 deletions components/asic/include/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#define SERIAL_BUF_SIZE 16
#define CHUNK_SIZE 1024

static uint8_t asic_timeout_counter = 0;
static uint8_t asic_timeout_warning_threshold = 2;
static int uart_timeout_ms = 10000;

int SERIAL_send(uint8_t *, int, bool);
void SERIAL_init(void);
void SERIAL_debug_rx(void);
Expand Down

0 comments on commit e06108e

Please sign in to comment.