view cdg-hybrid/sap/aci.pdf @ 78:c632896652ba

mfw/ti1_key.c: properly initialize notified_keys array The code in this ti1_key.c layer needs to call kpd_subscribe() and kpd_define_key_notification() functions in order to register with the KPD driver. The original code passed KPD_NB_PHYSICAL_KEYS in nb_notified_keys - this constant is defined to 24 in kpd_cfg.h on all platforms of interest to us - but it only filled the first 23 slots in the notified_keys array, resulting in stack garbage being passed to KPD API functions. The fix consists of initializing the last missed array slot to KPD_KEY_RECORD, the key ID for the right side button on the D-Sample handset. On our current hw targets this "Record" button exists as the EXTRA button on our Luna keypad board and as the camera button on the Pirelli DP-L10. There is no support whatsoever for this button in current BMI+MFW, we have no plans of doing anything with Pirelli's camera button even if we do get our UI fw running on that phone, and the Mother's dream of building our own FreeCalypso handset with the same button arrangement as D-Sample (including the right side button) is currently very nebulous - but let us nonetheless handle the full set of buttons on the KPD to MFW interface, and let upper layers weed out unsupported buttons.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Oct 2020 23:41:01 +0000
parents 35f7a1dc9f7d
children
line wrap: on
line source

;********************************************************************************
;*** File           : aci.pdf
;*** Creation       : Wed Mar 11 09:57:41 CST 2009
;*** XSLT Processor : Apache Software Foundation / http://xml.apache.org/xalan-j / supports XSLT-Ver: 1
;*** Copyright      : (c) Texas Instruments AG, Berlin Germany 2002
;********************************************************************************
;*** Document Type  : Service Access Point Specification
;*** Document Name  : aci
;*** Document No.   : 8411.105.00.205
;*** Document Date  : 2004-06-01
;*** Document Status: BEING_PROCESSED
;*** Document Author: Liyi Yu
;********************************************************************************



PRAGMA 	SRC_FILE_TIME 	"Thu Nov 29 09:29:50 2007"
PRAGMA 	LAST_MODIFIED 	"2004-06-01"
PRAGMA 	ID_AND_VERSION 	"8411.105.00.205"



CONST 	MAX_CMD_LEN 	380 	; length of one ACI command sequence
CONST 	MAX_TRC_LEN 	80 	; Max. length of one ACI trace buffer
CONST 	MAX_DATA_LEN 	200 	; length of the signal data



VALTAB 	VAL_cmd_src
VAL 	0 	CMD_SRC_INT 	"Command from internal application"
VAL 	1 	CMD_SRC_EXT 	"Command from external application"
VAL 	255 	CMD_SRC_UNKNOWN 	"Reserved"

VALTAB 	VAL_urt_stat
VAL 	0 	URT_RDY_TO_SEND 	"URT is ready to accept new data"
VAL 	1 	URT_DATA_AVAIL 	"URT has data available"
VAL 	255 	URT_STAT_UNKNOWN 	"Reserved"

VALTAB 	VAL_cause
VAL 	0 	ABT_ABORT_DATA 	"Abort data mode"
VAL 	1 	ABT_ABORT_CMD 	"Abort current command"

VALTAB 	VAL_ackflg
VAL 	0 	ACI_NAK 	"Not Acknowledge"
VAL 	1 	ACI_ACK 	"Acknowledge"




VAR 	cmd_src 	"Command source" 	B

VAL 	@p_aci - VAL_cmd_src@ 	

VAR 	cmd_len 	"Length of command" 	S


VAR 	cmd_seq 	"Command sequence" 	B


VAR 	urt_stat 	"URT status" 	B

VAL 	@p_aci - VAL_urt_stat@ 	

VAR 	cause 	"Cause" 	B

VAL 	@p_aci - VAL_cause@ 	

VAR 	ackflg 	"Acknowledge flag" 	B

VAL 	@p_aci - VAL_ackflg@ 	

VAR 	port_nb 	"port pumber" 	L


VAR 	src_id 	"ACI source ID" 	B


VAR 	trc_len 	"Length of trace" 	S


VAR 	trc_buf 	"Trace buffer" 	B


VAR 	cmd_ptr 	"Command index" 	L


VAR 	signal_id 	"Signal Id" 	S


VAR 	data 	"Signal data" 	L








; ACI_CMD_REQ 	0x1500
; ACI_CMD_CNF 	0x5502
; ACI_CMD_IND 	0x5500
; ACI_CMD_RES 	0x1502
; ACI_ABORT_REQ 	0x1501
; ACI_URT_STAT_IND 	0x5501
; ACI_INIT_IND 	0x5503
; ACI_INIT_RES 	0x1503
; ACI_DEINIT_REQ 	0x1504
; ACI_DEINIT_CNF 	0x5504
; ACI_OPEN_PORT_REQ 	0x1505
; ACI_OPEN_PORT_CNF 	0x5505
; ACI_CLOSE_PORT_REQ 	0x1506
; ACI_CLOSE_PORT_CNF 	0x5506
; ACI_ABORT_CNF 	0x5507
; ACI_CMD_REQ_BT 	0x1507
; ACI_CMD_CNF_BT 	0x5508
; ACI_CMD_IND_BT 	0x5509
; ACI_CMD_RES_BT 	0x1508
; ACI_ABORT_REQ_BT 	0x1509
; ACI_ABORT_CNF_BT 	0x5510
; ACI_TRC_IND 	0x550A
; ACI_RIV_CMD_REQ 	0x1510
; ACI_EXT_IND 	0x150B



PRIM 	ACI_CMD_REQ 	0x1500
{
 	cmd_src 	 ; Command source
 	cmd_len 	 ; length of command
 	cmd_seq 	[MAX_CMD_LEN] 	 ; Command
}






PRIM 	ACI_CMD_CNF 	0x5502
{
 	cmd_len 	 ; length of the command
 	cmd_seq 	[MAX_CMD_LEN] 	 ; command
}






PRIM 	ACI_CMD_IND 	0x5500
{
 	cmd_len 	 ; length of the command
 	cmd_seq 	[MAX_CMD_LEN] 	 ; command
}






PRIM 	ACI_CMD_RES 	0x1502
{
}






PRIM 	ACI_ABORT_REQ 	0x1501
{
 	cmd_src 	 ; Command source
 	cause 	 ; Abort cause
}






PRIM 	ACI_URT_STAT_IND 	0x5501
{
 	urt_stat 	 ; status of URT
}






PRIM 	ACI_INIT_IND 	0x5503
{
}






PRIM 	ACI_INIT_RES 	0x1503
{
 	ackflg 	 ; Acknowledge
}






PRIM 	ACI_DEINIT_REQ 	0x1504
{
}






PRIM 	ACI_DEINIT_CNF 	0x5504
{
}






PRIM 	ACI_OPEN_PORT_REQ 	0x1505
{
 	port_nb 	 ; port number
}






PRIM 	ACI_OPEN_PORT_CNF 	0x5505
{
 	port_nb 	 ; port number
 	ackflg 	 ; result
}






PRIM 	ACI_CLOSE_PORT_REQ 	0x1506
{
 	port_nb 	 ; port number
}






PRIM 	ACI_CLOSE_PORT_CNF 	0x5506
{
 	port_nb 	 ; port number
}






PRIM 	ACI_ABORT_CNF 	0x5507
{
 	cmd_len 	 ; length of the command
 	cmd_seq 	[MAX_CMD_LEN] 	 ; command
}






PRIM 	ACI_CMD_REQ_BT 	0x1507
{
 	cmd_src 	 ; Command source
 	cmd_len 	 ; length of command
 	cmd_seq 	[MAX_CMD_LEN] 	 ; Command
 	src_id 	 ; ACI source
}






PRIM 	ACI_CMD_CNF_BT 	0x5508
{
 	cmd_len 	 ; length of the command
 	cmd_seq 	[MAX_CMD_LEN] 	 ; command
 	src_id 	 ; ACI source
}






PRIM 	ACI_CMD_IND_BT 	0x5509
{
 	cmd_len 	 ; length of the command
 	cmd_seq 	[MAX_CMD_LEN] 	 ; command
 	src_id 	 ; ACI source
}






PRIM 	ACI_CMD_RES_BT 	0x1508
{
 	src_id 	 ; ACI source
}






PRIM 	ACI_ABORT_REQ_BT 	0x1509
{
 	cmd_src 	 ; Command source
 	cause 	 ; Abort cause
 	src_id 	 ; ACI source
}






PRIM 	ACI_ABORT_CNF_BT 	0x5510
{
 	src_id 	 ; ACI source
}






PRIM 	ACI_TRC_IND 	0x550A
{
 	cmd_src 	 ; Command source
 	trc_len 	 ; length of trace
 	trc_buf 	[MAX_TRC_LEN] 	 ; trace
}






PRIM 	ACI_RIV_CMD_REQ 	0x1510
{
 	cmd_ptr 	 ; Command index
}






PRIM 	ACI_EXT_IND 	0x150B
{
 	signal_id 	 ; Signal Id
 	data 	[MAX_DATA_LEN] 	 ; data of the signal
}