projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add support for backlight control in ao_lco_bits
[fw/altos]
/
src
/
drivers
/
ao_lco.h
diff --git
a/src/drivers/ao_lco.h
b/src/drivers/ao_lco.h
index 50ed068acb2477040fc5630269b181c6db879a7a..42f4e6d845a2ad0a798f683e796f4211aa5a4045 100644
(file)
--- a/
src/drivers/ao_lco.h
+++ b/
src/drivers/ao_lco.h
@@
-51,10
+51,19
@@
extern struct ao_pad_query ao_pad_query; /* Last received QUERY from pad */
#define AO_LCO_BOX_FIRST AO_LCO_BOX_DRAG
#else
#define AO_LCO_LCO_VOLTAGE 0 /* Box number to show LCO voltage */
#define AO_LCO_BOX_FIRST AO_LCO_BOX_DRAG
#else
#define AO_LCO_LCO_VOLTAGE 0 /* Box number to show LCO voltage */
+# ifdef AO_LCO_HAS_BACKLIGHT
+# define AO_LCO_BACKLIGHT -2
+# ifndef AO_LCO_BOX_FIRST
+# define AO_LCO_BOX_FIRST AO_LCO_BACKLIGHT
+# endif
+# endif
# ifdef AO_LCO_HAS_CONTRAST
# define AO_LCO_CONTRAST -1
# ifdef AO_LCO_HAS_CONTRAST
# define AO_LCO_CONTRAST -1
-# define AO_LCO_BOX_FIRST AO_LCO_CONTRAST
-# else
+# ifndef AO_LCO_BOX_FIRST
+# define AO_LCO_BOX_FIRST AO_LCO_CONTRAST
+# endif
+# endif
+# ifndef AO_LCO_BOX_FIRST
# define AO_LCO_BOX_FIRST AO_LCO_LCO_VOLTAGE
# endif
#endif
# define AO_LCO_BOX_FIRST AO_LCO_LCO_VOLTAGE
# endif
#endif
@@
-75,6
+84,10
@@
ao_lco_box_pseudo(int16_t box)
#ifdef AO_LCO_CONTRAST
case AO_LCO_CONTRAST:
return true;
#ifdef AO_LCO_CONTRAST
case AO_LCO_CONTRAST:
return true;
+#endif
+#ifdef AO_LCO_BACKLIGHT
+ case AO_LCO_BACKLIGHT:
+ return true;
#endif
default:
return false;
#endif
default:
return false;
@@
-182,12
+195,20
@@
ao_lco_box_present(int16_t box);
#ifdef AO_LCO_HAS_CONTRAST
void
#ifdef AO_LCO_HAS_CONTRAST
void
-ao_lco_set_contrast(int
16
_t contrast);
+ao_lco_set_contrast(int
32
_t contrast);
-int
16
_t
+int
32
_t
ao_lco_get_contrast(void);
#endif
ao_lco_get_contrast(void);
#endif
+#ifdef AO_LCO_HAS_BACKLIGHT
+void
+ao_lco_set_backlight(int32_t backlight);
+
+int32_t
+ao_lco_get_backlight(void);
+#endif
+
#ifdef AO_LCO_SEARCH_API
void
#ifdef AO_LCO_SEARCH_API
void