mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
doxygen: Added documentation to led bar (my9221)
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
parent
0340d736de
commit
d1f7df0552
@ -42,8 +42,9 @@ sig_handler(int signo)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
//! [Interesting]
|
||||
upm::MY9221 *bar = new upm::MY9221(8, 9);
|
||||
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
while (!running) {
|
||||
@ -52,6 +53,7 @@ main(int argc, char **argv)
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
//! [Interesting]
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
|
@ -28,20 +28,47 @@
|
||||
#include <maa/gpio.h>
|
||||
|
||||
#define MAX_BIT_PER_BLOCK 16
|
||||
#define CMDMODE 0x0000
|
||||
#define CMDMODE 0x0000
|
||||
#define BIT_HIGH 0x00ff
|
||||
#define BIT_LOW 0x0000
|
||||
#define BIT_LOW 0x0000
|
||||
|
||||
#define HIGH 1
|
||||
#define LOW 0
|
||||
#define LOW 0
|
||||
|
||||
namespace upm {
|
||||
|
||||
/**
|
||||
* @brief C++ API for MY9221 led bar module
|
||||
*
|
||||
* This file defines the MY9221 C++ interface for libmy9221
|
||||
*
|
||||
* @snippet led-bar.cxx Interesting
|
||||
*/
|
||||
class MY9221 {
|
||||
public:
|
||||
/**
|
||||
* Instanciates a MY9221 object
|
||||
*
|
||||
* @param di data pin
|
||||
* @param dcki clock pin
|
||||
*/
|
||||
MY9221 (uint8_t di, uint8_t dcki);
|
||||
|
||||
/**
|
||||
* MY9221 object destructor
|
||||
*/
|
||||
~MY9221 ();
|
||||
|
||||
/**
|
||||
* Set the level bar
|
||||
*
|
||||
* @param level selected level for the bar (1 - 10)
|
||||
*/
|
||||
maa_result_t setBarLevel (uint8_t level);
|
||||
|
||||
/**
|
||||
* Return name of the component
|
||||
*/
|
||||
std::string name()
|
||||
{
|
||||
return m_name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user