2 * Logic Output RPP API header file.
6 * @copyright Copyright (C) 2013 Czech Technical University in Prague
8 * @author Carlos Jenkins <carlos@jenkins.co.cr>
16 * LOUT module initialization.
18 * Call this method before using this module.
20 * @return SUCCESS if initialization successful.\n
21 * FAILURE if module already initialized.
23 int8_t rpp_lout_init();
27 * Set the output cache of given pin to given value.
29 * Call rpp_lout_update() to flush cached values to real hardware.
31 * @param[in] pin The pin number to set [1-8].
32 * @param[in] val The value to be set [HIGH|LOW].
34 * @return SUCCESS when success.\n
35 * -1 if pin number is out of range.
37 int8_t rpp_lout_set(uint8_t pin, uint8_t val);
41 * Get the diagnostic cached value for given pin.
43 * Call rpp_lout_update() to update cached values.
45 * @param[in] pin The pin number to read [1-8].
47 * @return HIGH or LOW if successful.\n
48 * -1 if pin number is out of range.
50 int8_t rpp_lout_diag(uint8_t pin);
54 * Flush cached output values and read back diagnostic values of all pins.
56 * @return SUCCESS when transaction was successful.\n
57 * FAILURE if transaction could not be confirmed.
59 int8_t rpp_lout_update();
62 #endif /* __RPP_LOUT_H */