mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 13:21:44 +03:00
ffa3996a5e
* clang-format: AllowShortEnumsOnASingleLine: false * clang-format: InsertNewlineAtEOF: true * clang-format: Standard: c++20 * clang-format: AlignConsecutiveBitFields * clang-format: AlignConsecutiveMacros * clang-format: RemoveParentheses: ReturnStatement * clang-format: RemoveSemicolon: true * Restored RemoveParentheses: Leave, retained general changes for it * formatting: fixed logging TAGs * Formatting update for dev Co-authored-by: あく <alleteam@gmail.com>
24 lines
821 B
C
24 lines
821 B
C
/**
|
|
* @file digital_signal_i.h
|
|
* @brief DigitalSignal private definitions.
|
|
*
|
|
* This file is an implementation detail. It must not be included in
|
|
* any public API-related headers.
|
|
*/
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#define DIGITAL_SIGNAL_T_TIM 1562 /**< 15.625 ns *100 */
|
|
#define DIGITAL_SIGNAL_T_TIM_DIV2 (DIGITAL_SIGNAL_T_TIM / 2) /**< 15.625 ns / 2 *100 */
|
|
|
|
/**
|
|
* @brief DigitalSignal structure type.
|
|
*/
|
|
struct DigitalSignal {
|
|
bool start_level; /**< The level to begin the signal with. */
|
|
uint32_t size; /**< Current period count contained in the instance. */
|
|
uint32_t max_size; /**< Maximum period count this instance can hold. */
|
|
int32_t remainder; /**< Remainder left after converting all periods into timer ticks. */
|
|
uint32_t data[]; /**< The array of time periods. */
|
|
};
|