FreeCalypso > hg > fc-tourmaline
annotate src/cs/drivers/drv_app/r2d/r2d_onoff.c @ 266:160a5b3a076c
new ABB_SLEEP_RESTRICTION definition in fc-target.h
When we first introduced the mechanism to suppress ABB superdeep sleep
on targets with LCDs powered from Iota VRIO, we made it conditional on
CONFIG_TARGET_LUNA. This conditional is now being generalized: the
feature in question is now conditionalized on the new ABB_SLEEP_RESTRICTION
preprocessor symbol, to be defined in targets/*.h for those targets
that need it. The new ABB_SLEEP_RESTRICTION definition is being added
to targets/luna[12].h to keep the actual logic unchanged.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 02 Jun 2021 02:12:14 +0000 |
parents | 6541e43f88e5 |
children | 0196b6bf633c |
rev | line source |
---|---|
217
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This FreeCalypso-added R2D module implements on/off control |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * for BLRR (backlight required for readability) displays. |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include "rv/rv_general.h" |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include "r2d/r2d_config.h" |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include "r2d/r2d_messages.h" |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "r2d/r2d_blrr_api.h" |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #ifdef CONFIG_TARGET_LUNA |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include "r2d/lcds/luna/r2d_onoff_i.c" |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #elif defined(CONFIG_TARGET_C139) |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 #include "r2d/lcds/c139/r2d_onoff_i.c" |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #else |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #error "R2D on/off module selection: unsupported target" |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 #endif |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 void r2d_process_onoff_message(T_R2D_EVT *msg) |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 { |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 r2d_onoff_action(msg->status); |
6541e43f88e5
R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 } |