aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/backlight.c
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2018-03-21 23:50:38 -0700
committerJack Humbert <jack.humb@gmail.com>2018-03-22 02:50:38 -0400
commit7c9d5ace143d3cc6d767a354acde814926d566fd (patch)
tree1f2b581b6c9f6278a9e180bfcc8dd86b0a7fd2ef /tmk_core/common/backlight.c
parentf0932a8716dc946322c5ebae7f75eaa275c6220c (diff)
downloadqmk_firmware-7c9d5ace143d3cc6d767a354acde814926d566fd.tar.gz
qmk_firmware-7c9d5ace143d3cc6d767a354acde814926d566fd.zip
Generate API docs from source code comments (#2491)
* Generate api docs from source code * Add a bunch of doxygen comments * more doxygen comments * Add the in-progress api docs * script to generate docs from travis * Add doc generation to the travis job * make travis_docs.sh commit the work it does * make sure the docs script exits cleanly
Diffstat (limited to 'tmk_core/common/backlight.c')
-rw-r--r--tmk_core/common/backlight.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/tmk_core/common/backlight.c b/tmk_core/common/backlight.c
index 12f75b38a..3e29aacc4 100644
--- a/tmk_core/common/backlight.c
+++ b/tmk_core/common/backlight.c
@@ -21,6 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21 21
22backlight_config_t backlight_config; 22backlight_config_t backlight_config;
23 23
24/** \brief Backlight initialization
25 *
26 * FIXME: needs doc
27 */
24void backlight_init(void) 28void backlight_init(void)
25{ 29{
26 /* check signature */ 30 /* check signature */
@@ -34,6 +38,10 @@ void backlight_init(void)
34 backlight_set(backlight_config.enable ? backlight_config.level : 0); 38 backlight_set(backlight_config.enable ? backlight_config.level : 0);
35} 39}
36 40
41/** \brief Backlight increase
42 *
43 * FIXME: needs doc
44 */
37void backlight_increase(void) 45void backlight_increase(void)
38{ 46{
39 if(backlight_config.level < BACKLIGHT_LEVELS) 47 if(backlight_config.level < BACKLIGHT_LEVELS)
@@ -46,6 +54,10 @@ void backlight_increase(void)
46 backlight_set(backlight_config.level); 54 backlight_set(backlight_config.level);
47} 55}
48 56
57/** \brief Backlight decrease
58 *
59 * FIXME: needs doc
60 */
49void backlight_decrease(void) 61void backlight_decrease(void)
50{ 62{
51 if(backlight_config.level > 0) 63 if(backlight_config.level > 0)
@@ -58,6 +70,10 @@ void backlight_decrease(void)
58 backlight_set(backlight_config.level); 70 backlight_set(backlight_config.level);
59} 71}
60 72
73/** \brief Backlight toggle
74 *
75 * FIXME: needs doc
76 */
61void backlight_toggle(void) 77void backlight_toggle(void)
62{ 78{
63 backlight_config.enable ^= 1; 79 backlight_config.enable ^= 1;
@@ -68,6 +84,10 @@ void backlight_toggle(void)
68 backlight_set(backlight_config.enable ? backlight_config.level : 0); 84 backlight_set(backlight_config.enable ? backlight_config.level : 0);
69} 85}
70 86
87/** \brief Backlight step through levels
88 *
89 * FIXME: needs doc
90 */
71void backlight_step(void) 91void backlight_step(void)
72{ 92{
73 backlight_config.level++; 93 backlight_config.level++;
@@ -81,6 +101,10 @@ void backlight_step(void)
81 backlight_set(backlight_config.level); 101 backlight_set(backlight_config.level);
82} 102}
83 103
104/** \brief Backlight set level
105 *
106 * FIXME: needs doc
107 */
84void backlight_level(uint8_t level) 108void backlight_level(uint8_t level)
85{ 109{
86 if (level > BACKLIGHT_LEVELS) 110 if (level > BACKLIGHT_LEVELS)
@@ -91,6 +115,10 @@ void backlight_level(uint8_t level)
91 backlight_set(backlight_config.level); 115 backlight_set(backlight_config.level);
92} 116}
93 117
118/** \brief Get backlight level
119 *
120 * FIXME: needs doc
121 */
94uint8_t get_backlight_level(void) 122uint8_t get_backlight_level(void)
95{ 123{
96 return backlight_config.level; 124 return backlight_config.level;