annotate src/cs/drivers/drv_app/r2d/r2d_onoff.c @ 303:f76436d19a7a default tip

!GPRS config: fix long-standing AT+COPS chance hanging bug There has been a long-standing bug in FreeCalypso going back years: sometimes in the AT command bring-up sequence of an ACI-only MS, the AT+COPS command would produce only a power scan followed by cessation of protocol stack activity (only L1 ADC traces), instead of the expected network search sequence. This behaviour was seen in different FC firmware versions going back to Citrine, and seemed to follow some law of chance, not reliably repeatable. This bug has been tracked down and found to be specific to !GPRS configuration, stemming from our TCS2/TCS3 hybrid and reconstruction of !GPRS support that was bitrotten in TCS3.2/LoCosto version. ACI module psa_mms.c, needed only for !GPRS, was missing in the TCS3 version and had to be pulled from TCS2 - but as it turns out, there is a new field in the MMR_REG_REQ primitive that needs to be set correctly, and that psa_mms.c module is the place where this initialization needed to be added.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 08 Jun 2023 08:23:37 +0000
parents 75758d7a9be3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
277
0196b6bf633c R2D: LCD hardware suspend implemented for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 217
diff changeset
7 #include "rvf/rvf_api.h"
217
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include "r2d/r2d_config.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include "r2d/r2d_messages.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include "r2d/r2d_blrr_api.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
278
75758d7a9be3 Luna: allow ABB superdeep sleep when the LCD is in suspend mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 277
diff changeset
12 extern int r2d_lcd_hw_suspend, ABB_sleep_allowed;
277
0196b6bf633c R2D: LCD hardware suspend implemented for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 217
diff changeset
13
217
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #ifdef CONFIG_TARGET_LUNA
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #include "r2d/lcds/luna/r2d_onoff_i.c"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #elif defined(CONFIG_TARGET_C139)
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #include "r2d/lcds/c139/r2d_onoff_i.c"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #else
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #error "R2D on/off module selection: unsupported target"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #endif
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 void r2d_process_onoff_message(T_R2D_EVT *msg)
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 {
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 r2d_onoff_action(msg->status);
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 }