Open RTS
Full implementation of the Somfy RTS protocol
Loading...
Searching...
No Matches
rts_remote_store_memory.h
Go to the documentation of this file.
1#ifndef RTS_REMOTE_STORE_MEMORY_H
2#define RTS_REMOTE_STORE_MEMORY_H
3
4#include "rts_remote_store.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
19// Maximum number of remotes a memory or mmap store can hold
20#define RTS_MAX_REMOTES 16
21
22// Internal struct to hold remotes/rolling codes
23struct rts_remote_store_memory_data {
24 int file_handle;
25 struct {
26 uint8_t num_remotes;
27 uint32_t remote_addresses[RTS_MAX_REMOTES];
28 uint16_t rolling_codes[RTS_MAX_REMOTES];
29 } * store;
30};
31
40void rts_remote_store_init_memory(struct rts_remote_store *store);
41
42// These functions are shared by rts_remote_store_mmap
43int8_t rts_remote_store_get_code_memory(struct rts_remote_store *store,
44 uint32_t remote_address,
45 uint16_t *rolling_code);
46
47int8_t rts_remote_store_set_code_memory(struct rts_remote_store *store,
48 uint32_t remote_address,
49 uint16_t rolling_code);
50
51int8_t rts_remote_store_forget_memory(struct rts_remote_store *store,
52 uint32_t remote_address);
53
54int8_t rts_remote_store_clear_memory(struct rts_remote_store *store);
55
60#ifdef __cplusplus
61} // extern "C"
62#endif
63
64#endif // RTS_REMOTE_STORE_MEMORY_H
Provides an interface for a datastore which contains details about remote controls and rolling codes.
Definition rts_remote_store.h:29