18 lines
741 B
C
18 lines
741 B
C
// Copyright (C) 2026 Hector van der Aa <hector@h3cx.dev>
|
|
// Copyright (C) 2026 Pierre Barbier <pierrebarbier741@gmail.com>
|
|
// Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
#include "global_state.h"
|
|
#ifdef DEBUG
|
|
#include "SEGGER_RTT.h"
|
|
#define DEBUG_LOG(fmt, ...) SEGGER_RTT_printf(0, fmt "\n", ##__VA_ARGS__)
|
|
#else
|
|
#define DEBUG_LOG(fmt, ...) \
|
|
do { \
|
|
} while (0)
|
|
#endif
|
|
#define CRANK(num) ringBufferRead(&state_g.crank_RB, num)
|
|
#define CAM(num) ringBufferRead(&state_g.cam_RB, num)
|
|
#define D1A CRANK(0)-CRANK(1)
|
|
#define D1B CRANK(1)-CRANK(2)
|