-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathttl.h
More file actions
40 lines (31 loc) · 918 Bytes
/
ttl.h
File metadata and controls
40 lines (31 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright (C) 2022-2023 Dmitry Ponomarev <ponomarevda96@gmail.com>
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/**
* @file ttl.h
* @author d.ponomarev
* @date Aug 10, 2022
*/
#ifndef DEVICES_SERVOS_TTL_H_
#define DEVICES_SERVOS_TTL_H_
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/// TTL timeout
void ttlSetTimeout(uint32_t ttl_ms);
uint32_t ttlGetTimeout();
/// Setpoints
void ttlSetSetpointTimestamp(uint8_t sp_idx, uint32_t crnt_time_ms);
uint32_t ttlGetSetpointTimestamp(uint8_t sp_idx);
uint32_t ttlGetBestTimestamp();
bool ttlIsSetpointAlive(uint8_t sp_idx, uint32_t crnt_time_ms);
bool ttlIsBestSetpointAlive(uint32_t crnt_time_ms);
#ifdef __cplusplus
}
#endif
#endif // DEVICES_SERVOS_TTL_H_