]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/include/rpp/lout.h
Minor changes of doxygen generated documentation.
[pes-rpp/rpp-lib.git] / rpp / include / rpp / lout.h
1 /**
2  * Logic Output RPP API header file.
3  *
4  * @file lout.h
5  *
6  * @copyright Copyright (C) 2013 Czech Technical University in Prague
7  *
8  * @author Carlos Jenkins <carlos@jenkins.co.cr>
9  */
10
11
12 #ifndef __RPP_LOUT_H
13 #define __RPP_LOUT_H
14
15 /**
16  * LOUT module initialization.
17  *
18  * Call this method before using this module.
19  *
20  * @return SUCCESS if initialization successful.\n
21  *         FAILURE if module already initialized.
22  */
23 int8_t rpp_lout_init();
24
25
26 /**
27  * Set the output cache of given pin to given value.
28  *
29  * Call rpp_lout_update() to flush cached values to real hardware.
30  *
31  * @param[in] pin       The pin number to set [1-8].
32  * @param[in] val       The value to be set [HIGH|LOW].
33  *
34  * @return SUCCESS when success.\n
35  *         -1 if pin number is out of range.
36  */
37 int8_t rpp_lout_set(uint8_t pin, uint8_t val);
38
39
40 /**
41  * Get the diagnostic cached value for given pin.
42  *
43  * Call rpp_lout_update() to update cached values.
44  *
45  * @param[in] pin       The pin number to read [1-8].
46  *
47  * @return HIGH or LOW if successful.\n
48  *         -1 if pin number is out of range.
49  */
50 int8_t rpp_lout_diag(uint8_t pin);
51
52
53 /**
54  * Flush cached output values and read back diagnostic values of all pins.
55  *
56  * @return SUCCESS when transaction was successful.\n
57  *         FAILURE if transaction could not be confirmed.
58  */
59 int8_t rpp_lout_update();
60
61
62 #endif /* __RPP_LOUT_H */