-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbar.h
More file actions
78 lines (64 loc) · 1.81 KB
/
bar.h
File metadata and controls
78 lines (64 loc) · 1.81 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
* ----------------------------------------------------------------------------
*
* "THE ANY BEVERAGE-WARE LICENSE" (Revision 42 - based on beer-ware license):
* <dev@layer128.net> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a be(ve)er(age) in return. (I don't
* like beer much.)
*
* Matthias Kleemann
*
* ----------------------------------------------------------------------------
*
* \file bar.h
*
* \date Created: 04.02.2012 21:18:57
* \author Matthias Kleemann
**/
#ifndef BAR_H_
#define BAR_H_
#include "config/bar_config.h"
/***************************************************************************/
/* PROTOTYPES */
/***************************************************************************/
/**
* @brief initialize bargraph hardware and control structs
*/
void bar_init(void);
/**
* @brief set bargraph to defined maximum value
*/
void bar_set_max(void);
/**
* @brief set bargraph to any value
* @param value - value within range to be set
*/
void bar_set(uint8_t value);
/**
* @brief clear bargraph
*/
void bar_clear(void);
/**
* @brief calculate pins to be set
* @param value - value to be calculated/matched within pins to use
* @return port value to be used directly on port pins
*/
uint8_t bar_calc_pins(uint8_t value);
/**
* @brief init chip select, if available
*/
void bar_init_cs(void);
/**
* @brief set chip select, if available
*
* This is done either set to HIGH level or LOW level, if inverted.
*/
void bar_set_cs(void);
/**
* @brief reset chip select, if available
*
* This is done either set to LOW level or HIGH level, if inverted.
*/
void bar_reset_cs(void);
#endif /* BAR_H_ */