comparison src/cs/services/lls/lls_api.c @ 51:04aaa5622fa7

disable deep sleep when Iota LEDB is on TI's Iota chip docs say that CLK13M must be running in order for LEDB to work, and practical experience on Mot C139 which uses Iota LEDB for its keypad backlight concurs: if Calypso enters deep sleep while the keypad backlight is turned on, the light flickers visibly as the chipset goes into and out of deep sleep. TI's original L1 sleep manager code had logic to disable deep sleep when LT_Status() returns nonzero, but that function only works for B-Sample and C-Sample LT, always returns 0 on BOARD 41 - no check of Iota LEDB status anywhere. Change this code for our current hardware: disable deep sleep when Iota LEDB has been turned on through LLS.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 19 Oct 2020 05:11:29 +0000
parents 4e78acac3d88
children
comparison
equal deleted inserted replaced
50:a62e5bf88434 51:04aaa5622fa7
29 29
30 30
31 /** External declaration */ 31 /** External declaration */
32 extern T_LLS_ENV_CTRL_BLK* lls_env_ctrl_blk; 32 extern T_LLS_ENV_CTRL_BLK* lls_env_ctrl_blk;
33 33
34 /* FreeCalypso addition for L1 sleep manager */
35 unsigned char iota_ledb_status;
36
34 37
35 /** 38 /**
36 * @name Functions implementation 39 * @name Functions implementation
37 * 40 *
38 */ 41 */
60 /* Retrieve index of the equipment in the table */ 63 /* Retrieve index of the equipment in the table */
61 ret = lls_search_index(equipment_sort, &equipment_index); 64 ret = lls_search_index(equipment_sort, &equipment_index);
62 65
63 if (ret != RV_OK) 66 if (ret != RV_OK)
64 { 67 {
65 LLS_SEND_TRACE("LLS: Equipment is unknow", RV_TRACE_LEVEL_ERROR); 68 LLS_SEND_TRACE("LLS: Equipment is unknown", RV_TRACE_LEVEL_ERROR);
66 return ret; 69 return ret;
67 } 70 }
71
72 /* FreeCalypso addition */
73 if (equipment_sort == LLS_BACKLIGHT)
74 iota_ledb_status = 1;
68 75
69 ret = lls_manage_equipment(equipment_index, SWITCH_ON); 76 ret = lls_manage_equipment(equipment_index, SWITCH_ON);
70 77
71 return ret; 78 return ret;
72 79
97 /* Retrieve index of the equipment in the table */ 104 /* Retrieve index of the equipment in the table */
98 ret = lls_search_index(equipment_sort, &equipment_index); 105 ret = lls_search_index(equipment_sort, &equipment_index);
99 106
100 if (ret != RV_OK) 107 if (ret != RV_OK)
101 { 108 {
102 LLS_SEND_TRACE("LLS: Equipment is unknow", RV_TRACE_LEVEL_ERROR); 109 LLS_SEND_TRACE("LLS: Equipment is unknown", RV_TRACE_LEVEL_ERROR);
103 return ret; 110 return ret;
104 } 111 }
105 112
106 ret = lls_manage_equipment(equipment_index, SWITCH_OFF); 113 ret = lls_manage_equipment(equipment_index, SWITCH_OFF);
107 114
115 /* FreeCalypso addition */
116 if (equipment_sort == LLS_BACKLIGHT)
117 iota_ledb_status = 0;
118
108 return ret; 119 return ret;
109 120
110 #else 121 #else
111 return RV_NOT_SUPPORTED; 122 return RV_NOT_SUPPORTED;
112 #endif 123 #endif