-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlutGenerator.h
59 lines (50 loc) · 1.96 KB
/
lutGenerator.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Copyright (c) 2023 OscillatorIMP Digital
* Gwenhael Goavec-Merou <[email protected]>
*/
#ifndef LUTGENERATOR_CONF_H
#define LUTGENERATOR_CONF_H
#ifdef __cplusplus /* if C++, specify external linkage to C functions */
extern "C" {
#endif
#include <stdint.h>
/* \brief sent `fileData` content to the IP
* \param[in] filename: /dev/xxx
* \param[in] fileData: sample file must be ASCII to column integer values
* \param[in] len: number of sample to read/send
* \return 0 when success, error code (<0) otherwise
*/
int lutGeneratorComplex_fill_ram(const char *filename, const char *fileData,
const int len);
/* \brief configure `prescaler`
* \param[in] fileData: /dev/xxx
* \param[in] prescaler: the prescaler value between 1 and `PRESCALER_MAX`
* \return 0 when success, error code (<0) otherwise
*/
int lutGenerator_set_prescaler(const char *filename, const uint32_t prescaler);
/* \brief configure ram_length
* \param[in] fileData: /dev/xxx
* \param[in] len: number of sample to read before restarting
* \return 0 when success, error code (<0) otherwise
*/
int lutGenerator_set_ram_length(const char *filename, const int len);
/* \brief enable/disable stream
* \param[in] fileData: /dev/xxx
* \param[in] enable: 1 to enable stream, 0 to disable
* \return 0 when success, error code (<0) otherwise
*/
int lutGenerator_enable(const char *filename, const uint8_t enable);
/* \brief sent `fileData` content to the IP
* \param[in] filename: /dev/xxx
* \param[in] fileData: sample file must be ASCII to column integer values
* \param[in] len: number of sample to read/send
* \param[in] enable: 1 to enable stream, 0 to disable
* \param[in] prescaler: the prescaler value between 1 and `PRESCALER_MAX`
* \return 0 when success, error code (<0) otherwise
*/
int lutGeneratorComplex_configure(const char *filename, const char *fileData,
const int len, const uint8_t enable, const uint32_t prescaler);
#ifdef __cplusplus
}
#endif
#endif /*LUTGENERATOR_CONF_H*/